You should use the equals() method for comparing Strings, not the == operator.