You rarely want to test Strings (or other objects) with ==, use the equals method instead.