In String class hashCode() method is readable format of memory address.
As per the below code == operator compares memory location or hashcodes.
then how == operator returning false and hashCode() method returns true.
public class TestStringEquals {
    public static void main(String[] args) {
         String s1="Hello World";
         System.out.println(s1.toUpperCase()==s1.toUpperCase());   //false
         System.out.println(s1.toUpperCase().hashCode()==s1.toUpperCase().hashCode());   //true
    }
}
 
    