Various Java exercises from Codingbat.com