FileDocCategorySizeDatePackage
Factorial2.javaAPI DocExample634Mon Sep 22 13:30:30 BST 1997None

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);