How to get rid of Integer.parseInt in the line:
BigInteger i = BigInteger.valueOf(Integer.parseInt(factorial(n - 1)) * n); The method has the form String factorial(int n) .
How to get rid of Integer.parseInt in the line:
BigInteger i = BigInteger.valueOf(Integer.parseInt(factorial(n - 1)) * n); The method has the form String factorial(int n) .
Source: https://ru.stackoverflow.com/questions/610216/
All Articles
factorialmethod returns aString, then, apparently, it’s all clear what’s going on in this method, which is absolutely not connected with the optimal way of finding the factorial of a number. - Regent