Print prime numbers in java
A prime number which can not be divided by any other number except 1 or by itself. The only even prime number is 2. All other even numbers can be divided by 2. Zero and 1 are not considered prime numbers. e.g – 3 – prime number (3 can not be divided by any other…