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