import java.math.BigInteger; import java.util.stream.LongStream; public class Factorial { public BigInteger factorialOf(Integer value){ return BigInteger.valueOf( LongStream.rangeClosed(1, value).reduce(1, (x, y) -> x * y) ); } }