class SuperC
{
public SuperC(){
amethod(); //use the sub's version???
}
public void amethod(){
System.out.println("super's me");
}
}
class SubC extends SuperC
{
public SubC(){
//will call the super()
}
public void amethod(){
super.amethod();
System.out.println("sub's me");
}
public static void main(
String[] args)
{
SubC sub = new SubC();
}
}//
//the result shows that the super() calling has used the sub's overrided amethod instead of its own, why???
can someone explain this, thanks!