overview
- String a = "ab";
- String b = "a" + "b";
- System.out.println(a==b); //true
- String a = "abc";
- String b="ab";
- String c=b+"c";
- System.out.println(a==c); //false
- String a = "ab1";
- String b = "ab"+1;
- System.out.println(a==b);//true
- String a = "ab1";
- String b = "ab"+1;
- String c = b + "";
- System.out.println(a==c); //false
- String a = new String("abc");
- String b = "abc";
- System.out.println(a==b); //false
- String a = "abc";
- String b = "abc";
- System.out.println(a==b); //true