Program for Prime Number in Java

Here you will get program for prime number in java.

A number is prime if it is divisible by 1 or itself. For example 2, 3, 5, etc are prime numbers while 4, 6, 8, etc are not prime.

Program for Prime Number in Java

 

Output

Java program to check whether a number is prime or not

Leave a Reply

Your email address will not be published. Required fields are marked *