Java题很急求大神解答!!

2024-11-16 09:58:49
推荐回答(1个)
回答1:

第一题:
public abstract class A {
public abstract void methodA();
public abstract void methodB();

public void methodC(){};
public void methodD(){};
}
第二题:
public class As extends A{
@Override
public void methodA() {
// TODO Auto-generated method stub
}

@Override
public void methodB() {
// TODO Auto-generated method stub
}
@Override
public void methodC() {
// TODO Auto-generated method stub
//super.methodC();
}
}
第三题:
public static void main(String[] args) {
//声明一个A类型的As
A a = new As();
}