Question: Write a Java program that finds prime numbers: 1. Create a method called isPrime that accepts an Integer value and returns true if it is
Write a Java program that finds prime numbers:
1. Create a method called isPrime that accepts an Integer value and returns true if it is prime and false if it is not.
2. In your main method, write a loop that that calls the method and passes it values from 1 to 100.
3. This loop should display all of the values that are prime.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
