public class Sub {
private String name ="sub";
public Sub(){
test();
}
public void test(){
System.out.println("sub"+ name);
}
public static void main(String[] args) {
Son1 son = new Son1();
}
}
class Son1 extends Sub{
private String name ="son";
public Son1(){
test();
}
public void test(){
System.out.println("son"+name);
}
}