()
| 23 | class Thing4 implements Cloneable { |
| 24 | private Thing3 t3 = new Thing3(); |
| 25 | @Override public Thing4 clone() { |
| 26 | Thing4 t4 = null; |
| 27 | try { |
| 28 | t4 = (Thing4)super.clone(); |
| 29 | } catch(CloneNotSupportedException e) { |
| 30 | throw new RuntimeException(e); |
| 31 | } |
| 32 | // Clone the field, too: |
| 33 | t4.t3 = t3.clone(); |
| 34 | return t4; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | public class Compete { |