Euler solutions in Java