题目内容 (请给出正确答案)
[多选题]

class Person { 2) public void printValue()

A.on?line?2

B.on?line?3

C.on?line?6

D.on?line?7

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“class Person { 2) public void …”相关的问题

第1题

Given the following code: 1)class Person { 2) public void printValue(int i, int j) {/*…*/ } 3) pu

Given the following code:

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)}

12)}

Which method will the statement on line 10 call?

A.on line 2 B.on line 3

C.on line 6 D.on line 7

点击查看答案

第2题

对于下列代码: 1) class Person { 2) public void printValue(inti, int j) {..、} 3) publi

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

A、line 2

B、line 3

C、line 6

D、line 7

点击查看答案

第3题

有以下程序: 1)class Person { 2)public void printValue(inti, int j) {/*…*/ } 3)public void printVa

有以下程序:

1)class Person {

2)public void printValue(inti, 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)Persorn t=new Teacher();

10)t.printValue(10);

11)}

12)}

第10行的声明将调用的方法______。

A.on line 2 B.on line 3 C.on line 6 D.on line 7

点击查看答案

第4题

给出下面的代码: class Person{ String name,department ; public void printValue(){ System.out.prin

给出下面的代码:

class Person{

String name,department ;

public void printValue(){

System.out.println("name is"+name);

System.out.println("department is "+department);

}

}

public class Teacher extends Person{

int salary;

public void printValue(){

//doing the same as in the parent method printValue()

//including print the value of name and department.

System.out.printin("salary is"+salary);

}

}

下面的______表达式可以加入printValue()方法的”doing the same as…”部分.

A.printValue(); B.this.printValue();

C.person.printValue();D.super.printValue();

点击查看答案

第5题

对于下列代码: 1) class Person { 2) public void printValue()

A.line 2

B.line 3

C.line 6

D.line 7

点击查看答案

第6题

对于下列代码: 1) class Person { 2) public void printValue()语句

A.第 2 行

B.第 3 行

C.第 6 行

D.第 7 行

点击查看答案

第7题

第10行的声明将调用哪一行的方法? class Person { public void printValue(); } }

A.第2行

B.第3行

C.第6行

D.第7行

点击查看答案

第8题

下列程序的输出结果是public class fff {void printValue (int m) {do { System.out.println("Th

下列程序的输出结果是public class fff { void printValue (int m) { do { System.out.println("The value is" +m); } while(--m>10) } public static void main (String arg[]) { int i=10; Test t= new Test(); t. printValue(i); }}

A.8

B.9

C.10

D.11

点击查看答案

第9题

Given the following code: public class Test { void printValue(int m) { do { System.out.println(&q

Given the following code:

public class Test {

void printValue(int m) {

do { System.out.println("The value is"+m);

}

while(--m >10 )

}

public static void main(String arg[]) {

int i=10;

Test t= new Test ();

t.printValue(i) ;

}

}

Which will be output?

A.The value is 8 B.The value is 9

C.The value is 10 D.The value is 11

点击查看答案
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
温馨提示
每个试题只能免费做一次,如需多次做题,请购买搜题卡
立即购买
稍后再说
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
赏学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反赏学吧购买须知被冻结。您可在“赏学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
赏学吧
点击打开微信