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