import java.math.BigInteger; public class Factorial { public BigInteger factorialOf(Integer value){ BigInteger n = BigInteger.valueOf(1); for (int i=2; i <=value; i++){ n= n.multiply(BigInteger.valueOf(i)); } return n; } }