可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

10. interface Foo {&en


10. interface Foo { int bar(); }  11. public class Sprite {  12. public int fubar( Foo foo) { return foo.bar(); }  13. public void testFoo() {  14. fubar(  15. // insert code here  16.);  17. }  18. }  Which code, inserted at line 15, allows the class Sprite to compile?() 

  • A Foo { public int bar() { return 1; } }
  • B new Foo { public int bar() { return 1; } }
  • C newFoo() { public int bar(){return 1; } }
  • D new class Foo { public int bar() { return 1; } }
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、若a=5,b=3,c=4,逻辑表达式!(a+b)&;&;!c的值

若a=5,b=3,c=4,逻辑表达式!(a+b)&;&;!c的值为()A0B-1C1D2

2、public interface Foo{ 

public interface Foo{ int k = 4; }  Which three are equivalent to line 2?() &ensp...

3、public interface Foo {

public interface Foo { int k = 4; 3. } Which three are equivalent to line 2?()A&e...

4、10. interface Foo {}&e

10. interface Foo {} 11. class Alpha implements Foo {} 12. class Beta extends Alpha {}&ens...

5、10. interface Foo {&en

10. interface Foo { 11. int bar(); 12. } 13. 14. public class Beta { 15. 16. ...

6、表达式10>5&&6%3的值是()

表达式10>5&&6%3的值是()A-1B非零值C0D1