public class Test03 {
public static void main(String[] args) {
/* String s1 = new String("ABC");
String s2 = "ABC";
System.out.println(s1==s2);//false
System.out.println(s1.equals(s2));//true
System.out.println("2==============");
String s3 = "abc";
String s4 = "abc";
System.out.println(s3 == s4);//true
System.out.println(s3.equals(s4));//true
System.out.println("3==============");
String s5 = "a" + "b" + "c";
String s6 = "abc";
System.out.println(s5 == s6);//true
System.out.println(s5.equals(s6));//true*/
System.out.println("4==============");
String s1 = "ab";
String s2 = "abc";
String s3 = s1 + "c";
System.out.println(s3 == s2);//false
System.out.println(s3.equals(s2));//true
}
}