Challenge acquired from rubyquiz.com (Quiz 2 - using Java instead of Ruby)