Sieve of Eratosthenes in Java