3 ms·
The point of that example wasn't to show if there was a standard library function for it. It was to show the verbosity of writing code that contains if conditio
by vips7L 4y ago
The point of that example wasn't to show if there was a standard library function for it. It was to show the verbosity of writing code that contains if conditions, loops, and generic programming. I obviously could have written:
new BigInteger(n).isProbablyPrime(0);