I have some method to find a factorial of big numbers. Could somebody explain, what's wrong with it and why i haven't any output?
public static long factorial(long num) {
BigInteger numm = BigInteger.valueOf(num);
BigInteger fact= BigInteger.valueOf(1);
for (; numm.compareTo(BigInteger.ZERO)==1 ; fact = fact.multiply(numm)) {
numm.subtract(BigInteger.ONE);
}
return fact.longValue();
}