62,615
社区成员
发帖
与我相关
我的任务
分享
public class Test01 extends A {
Test01 (){
print("B()");
}
public void f(){
print("B:f()");
}
public static void main(String[] args){
Test01 t = new Test01();
t.f();
}
}
class A {
protected void print(String s){
System.out.println(s);
}
A(){
print("A()");
}
public void f(){
print("A:f()");
}
}