62,614
社区成员
发帖
与我相关
我的任务
分享
package com.p1;
public class cat {
protected void cry() {
}
}
package com.p2;
import com.p1.cat;
public class tiger extends cat {
public static void main(String[] args) {
new cat().cry()
}
}
package com.p2;
import com.p1.*;
public class Tiger extends Cat {
void f()
{
super.cry(); //错误吗?
}
static void g()
{
new Cat().cry(); //错误吗?
new Tiger().cry(); //错误吗?
}
}