SImple Java program to calculate factorals