Fix a typo

This commit is contained in:
Chris Qi 2020-11-02 16:10:52 +00:00
parent 621f3adce9
commit d342e13dee

View File

@ -943,7 +943,7 @@ try {
e.printStackTrace(); e.printStackTrace();
} }
e1.set(2, 222); e1.set(2, 222);
System.out.println(e2.get(2)); // 2 System.out.println(e2.get(2)); // 222
``` ```
**4. clone() 的替代方案** **4. clone() 的替代方案**
@ -983,7 +983,7 @@ public class CloneConstructorExample {
CloneConstructorExample e1 = new CloneConstructorExample(); CloneConstructorExample e1 = new CloneConstructorExample();
CloneConstructorExample e2 = new CloneConstructorExample(e1); CloneConstructorExample e2 = new CloneConstructorExample(e1);
e1.set(2, 222); e1.set(2, 222);
System.out.println(e2.get(2)); // 2 System.out.println(e2.get(2)); // 222
``` ```
# 继承 # 继承