可学答题网 > 问答 > Java认证考试综合练习题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

1.public classA{ 2.public String doit


1.public classA{ 2.public String doit(intx,inty){ 3.return"a"; 4.} 5. 6.public String doit(int...vals){ 7.return"b"; 8.} 9.} And: 25.A a=new A(); 26.System.out.println(a.doit(4,5)); What is the result?()

  • ALine 26 prints "a" to System.out.
  • BLine 26 prints "b" to System.out.
  • CAn exception is thrown at line 26 at runtime.
  • DCompilation of class A will fail due to an error in line 6.
参考答案
参考解析:
分类:Java认证考试综合练习题库