public class Test {
public static void main(String[] args) throws Exception {
Test test = new Test();
Test testCloned = (Test) test.clone();
Test test2 = test;
boolean res = test.toString().equals(test2.toString());
boolean resClone = testCloned.toString().equals(test.toString());
System.out.println(res);
System.out.println(resClone);
}
}
Login in to like
Login in to comment