https://tutorialworld.in/java-coding/prime-number-java-while-loop/
Java Program to check whether a given number is Prime or not using while loop