package com.conger.test.r3;

public class CloneTest implements Cloneable
{
    private String status;

    private Test ttt;
    private TestTest sss;
    
    public static void main(String[] args) throws CloneNotSupportedException
    {
        CloneTest ct = new CloneTest();
        ct.ttt = new Test();
        ct.ttt.hello = 4;
        ct.status = "1";
        ct.sss = new TestTest();
        ct.sss.hello = 3;
        System.out.println(ct);
        CloneTest t = (CloneTest) ct.clone();
        System.out.println(t);
    }
    
    public String toString()
    {
        return status + " " + ttt.hello + " " + sss.hello + " " + ttt + " " + sss;
    }
    
    @Override
    public Object clone() throws CloneNotSupportedException
    {
        CloneTest t = (CloneTest) super.clone();
        t.sss = t.sss.clone();
        return t;
    }
}

class Test
{
    public int hello = 0;
}

class TestTest implements Cloneable
{
    public int hello = 0;
    
    @Override 
    public TestTest clone() throws CloneNotSupportedException
    {
        return (TestTest) super.clone();
    }
    
}
@@ -145,24 +145,84 @@
 t sss;%0A    %0A
+    private TestTest%5B%5D sa;%0A    private Test%5B%5D ta;%0A    %0A    %0A
     public s
@@ -471,16 +471,113 @@
 lo = 3;%0A
+        ct.ta = new Test%5B%5D%7Bnew Test()%7D;%0A        ct.sa = new TestTest%5B%5D%7Bnew TestTest()%7D;%0A        %0A
         
@@ -673,24 +673,208 @@
 println(t);%0A
+        %0A        System.out.println(ct.ta.clone()%5B0%5D);%0A        System.out.println(t.ta.clone()%5B0%5D);%0A        %0A        System.out.println(ct.sa%5B0%5D);%0A        System.out.println(t.sa%5B0%5D);%0A
     %7D%0A    %0A 

add array clone test