Prime Number Program in Java

A prime number is a number greater than 1 and divided by 1 or by itself. That is, Prime number is only divisible by 1 or itself.