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

1. interface TestA {&e


1. interface TestA { String toString(); }  2. public class Test {  3. public static void main(String[] args) {  4. System.out.println(new TestA() {  5. public String toString() { return “test”; }  6. }  7. }  8. }  What is the result?() 

  • A test
  • B null
  • C An exception is thrown at runtime.
  • D Compilation fails because of an error in line 1.
  • E Compilation fails because of an error in line 4.
  • F Compilation fails because of an error in line 5.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

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

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

2、AMPS通信系统属于第()代移动通信。

AMPS通信系统属于第()代移动通信。A第一代B第二代C第三代D第四代

3、设N=44,M=55,K=”N+M”,表达式1+&K的值是( )。

设N=44,M=55,K=”N+M”,表达式1+&K的值是( )。AA)4456BB)100CC)1+M+NDD)数据类型不匹配

4、AMPS属于()。

AMPS属于()。A1GB2GC3GD4G

5、cAMP(cyclic AMP)

cAMP(cyclic AMP)

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

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