You are viewing a single comment's thread. Return to all comments →
class Prime { public void checkPrime(int ... numbers) { StringBuilder message = new StringBuilder(); for (int number : numbers) { if (BigInteger.valueOf(number).isProbablePrime(1)) { message.append(number).append(" "); } } System.out.println(message); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Prime Checker
You are viewing a single comment's thread. Return to all comments →