单选题

对于下列代码: 1) class Person {   2} public void printValue(int i, int j) {//... }     3} public void printValue(int i){//... }    4} }   5) public class Teacher extends Person { 6} public void printValue( ) {//... }     7} public void printValue(int i) {//...}     8} public static void main(String args[]){     9} Person t = new Teacher( );     10} t.printValue(10);     11} } 第10行语句将调用哪行语句?()

A line 2

B line 3

C line 6

D line 7

正确答案

来源:www.examk.com

答案解析

相似试题
  • 设(BX)=0E3H,变量VALUE中存放内容为79H,指出下列指令单独执行后的结果。 (1)XOR BX,VALUE  (2)AND BX,VALUE  (3)OR BX, VALUE  (4)XOR BX,0FFH  (5)AND BX,BX  (6)AND BX,0

    简答题查看答案

  • Given: 10.interface Data { public void load(); } 11.abstract class Info { public abstract void load(); }  Which class correctly uses the Data interface and Info class?()

    单选题查看答案

  • 求下列运算结果。  A. NOT[((99)16OR(99)16)]  B.(99)16OR[NOT(00)16]  C. [(99)16AND(33)16]OR[(00)16AND(FF)16]  D. [(99)16OR(33)16]AND[(00)16OR(FF)16]

    简答题查看答案

  • Given two files, GrizzlyBear.java and Salmon.java: If both classes are in the correct directories for their packages,and the Mammal class correctly defines thefindSalmon() method, which change allows this code to compile?()

    单选题查看答案

  • 下列程序错误的原因是()  Sealed  class  SealedClass{  }   Class  Derived:SealedClass{  }

    单选题查看答案

  • Given: 1.package test; 2. 3.class Target { 4.public String name = "hello";5.} What can directly access and change the value of the variable name?()

    单选题查看答案

  • Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?()

    单选题查看答案

  • Given that the current directory is empty, and that the user has read and write permissions, and thefollowing: Which statement is true?()

    单选题查看答案

  • Given a class Repetition: Which code should be inserted at line 1 of Demo.java to compile and run Demo to print "pizzapizza"?()

    单选题查看答案

  • Given that Triangle implements Runnable, and: Which two statements, inserted independently at both lines 35 and 41, tend to allow both threads totemporarily pause and allow the other thread to execute?()

    多选题查看答案