Solutions to Java problems from CodingBat.com