FileDocCategorySizeDatePackage
Factorial2.javaAPI DocExample650Sat Jun 02 02:41:02 BST 2001None

Factorial2

public class Factorial2 extends Object
This class shows a recursive method to compute factorials. This method calls itself repeatedly based on the formula: n! = n * (n-1)!

Fields Summary
Constructors Summary
Methods Summary
public static longfactorial(long x)

    if (x == 1) return 1;
    else return x * factorial(x-1);