import java.math.BigInteger; public class Factorial { public BigInteger factorialOf(Integer value){ long big = 1; for (long i = 1; i <= value; i++) big *= i; return BigInteger.valueOf(big); } }