Prime Number Generator made in Java