How would you write a Java program to check if a number is prime?
You can implement a `for` loop that checks if a number is divisible by any number other than 1 and itself. If it is divisible, return false; otherwise, return true.
Nice work! You've outlined the steps for a prime number checker well.
Can you implement this approach and write the full Java code for it?