Project Euler - Java