public class C { public C(){ System.out.println("C"); } }
public class Cat extends C { public final Cat c = new Cat(); private String name; public Cat(){ //System.out.println(c.hashCode()); System.out.println("cat null"); } public Cat(String name){ System.out.println("cat"); this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
public class TestFinal { public static void main(String[] args) { Cat c1 = new Cat(); } }