rather than the == operator. This is because == compares the reference of the string rather than the actual value of the string. equals() will compare the actual value of the string Related