Find if the given number is a Prime number or not in Java

Description: write a program in Java to print if the given number is a Prime number or not.

Sample input: num = 23

Output: The given number 23 is a Prime number



Sample input: num = 14

Output: The given number 23 is NOT a Prime number.



Sample input: num = 29

Output: The given number 23 is a Prime number