Check whether given integer number is prime or not in java (example)

Given an integer, check whether input number is prime or not. A prime number is a natural number greater than 1 […]