EY Interview Question

Write a java program to print if a number is prime or not