Codingbat.com solutions in Java