program to check number is prime or not in java