Your mistake - a common one - is in using the equals operator, '==', rather than the equals() method to compare Strings.

Another construct to accomplish the same thing, perhaps simpler, is a...