java quiz solution