String s1 = "Amit"; //true
String s2 = "Amit"; //true
String s3 = new String("abcd"); //true
String s4 = new String("abcd"); //false
System.out.println(s1.equals(s2)); //true
System.out.println((s1==s2)); //true
System.out.println(s3.equals(s4)); //false
System.out.println((s3==s4)); //false
Assume it to be in main why the output of the above code is
true true true false and not true true false false???