Using Java to solve problems from projecteuler.net