I\'d like to print out all prime numbers from an array with method. I can do it with one int but don\'t know how to return certain numbers from array. Thanks for help!
Assuming you have:
Simply iterate over the array, and for each number:
if (isPrime(n)) {
system.out.println(n);
}
You probably don't want to try and do multiple ints at once, one at a time should be alot simpler to code.