class A
{
public A()
{
initAttrs();
}
public void initAttrs()
{
System.out.println("initAttrs in A");
}
}
class B extends A
{
public String s = null;
public B()
{
super();
}
public void initAttrs()
{
s = "aaa";
}
}
public class C
{
public static void main(String[] args)
{
B b = new B();
System.out.println(b.s);
}
} |
|