Java program to check prime number

Java program to check prime number


Output:

Enter a number to check for prime number: 8
8 is not a prime number

Implementation: