Keep in mind that the == operator will only work for primitive data types (char, int, double, float...ect.). When comparing Objects, in this case Strings, you should use the equals() method provided...