Revert "Fix a typo"
This reverts commit d342e13dee2e2cd78c574dc8f664cd8ff56e44c2.
This commit is contained in:
parent
80c9c496fb
commit
c99861183f
@ -943,7 +943,7 @@ try {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
e1.set(2, 222);
|
e1.set(2, 222);
|
||||||
System.out.println(e2.get(2)); // 222
|
System.out.println(e2.get(2)); // 2
|
||||||
```
|
```
|
||||||
|
|
||||||
**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)); // 222
|
System.out.println(e2.get(2)); // 2
|
||||||
```
|
```
|
||||||
|
|
||||||
# 六、继承
|
# 六、继承
|
||||||
|
Loading…
x
Reference in New Issue
Block a user