Itlize Global interview question

write a java code to check if a number is prime