mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-20 07:33:51 +00:00
s1 change to s2
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ String s1 = new String("aaa");
|
||||
String s2 = new String("aaa");
|
||||
System.out.println(s1 == s2); // false
|
||||
String s3 = s1.intern();
|
||||
String s4 = s1.intern();
|
||||
String s4 = s2.intern();
|
||||
System.out.println(s3 == s4); // true
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user