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