CodingBat solutions in Java