I have been asked this question in an interview, I said both would return false. but when I crossed checked it one was true other was false
can anyone explain it?
        String s1 = "H";
        String s2 = "e";
        String s3 = s1+s2;
        String s4 = "He";
        System.out.println(s3 == s4);//false
        String s5="h";
        String s6="h";
        System.out.println(s5 == s6);//true
 
     
     
     
     
     
     
     
    