Class Factorial

    • Method Detail

      • value

        public static long value​(int n)
        Computes the factorial of n.
        Parameters:
        n - Argument.
        Returns:
        n!
        Throws:
        IllegalArgumentException - if n < 0.
        IllegalArgumentException - if n > 20 (the factorial value is too large to fit in a long).