EY interview question

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