package adsadsa;
public class TestClone implements Cloneable{
private String a;
private int b;
private Double c;
public String getA() {
return a;
}
public void setA(String a) {
this.a = a;
}
public int getB() {
return b;
}
public void setB(int b) {
this.b = b;
}
public Double getC() {
return c;
}
public void setC(Double c) {
this.c = c;
}
public static void main(String[] args) {
TestClone test = new TestClone();
try {
TestClone test1 = (TestClone)test.clone();
test.setA("qweqwewq");
TestClone test2 = (TestClone)test.clone();
test.setB(3212);
TestClone test3 = (TestClone)test.clone();
test.setC(0.123);
TestClone test4 = (TestClone)test.clone();
System.out.println(test1.getA());
System.out.println(test2.getA());
System.out.println(test2.getB());
System.out.println(test3.getA());
System.out.println(test3.getB());
System.out.println(test3.getC());
System.out.println(test4.getA());
System.out.println(test4.getB());
System.out.println(test4.getC());
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
}
}