Question: Write a method named problem4. In this method, ask the user for an integer and determine whether this integer is a prime number or not.
Write a method named problem4. In this method, ask the user for an integer and determine whether this integer is a prime number or not. Return true if yes, false otherwise. A prime number is a number greater than 1 with only two factors themselves and 1. A prime number cannot be divided by any other numbers without leaving a remainder. java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
