多项选择题

1. class SuperFoo { 
2. SuperFoo doStuff(int x) { 
3. return new SuperFoo();
4. } 
5. } 
6. 
7. class Foo extends SuperFoo { 
8. //insert code here 
9. }  
下面哪三项分别插入到第8行,可以编译?()

A.int doStuff() { return 42; }
B.int doStuff(int x) { return 42; }
C.Foo doStuff(int x) { return new Foo(); }
D.SuperFoo doStuff(int x) { return new Foo(); }

相关考题