【单选题】classPerson{privateinta;publicintchange(intm){returnm;}}publicclassTeacherextendsPerson{publicintb;publicstaticvoidmain(Stringarg[]){Personp=newPerson();Teachert=newTeacher();inti;//pointx}}Whicharesyntacticallyvalidstatementat//pointx? A. i = m; B. i = b; C. i = p.a; D. i = p.change(30);
【单选题】classPerson{privateinta;publicintchange(intm){returnm;}}publicclassTeacherextendsPerson{publicintb;publicstaticvoidmain(Stringarg[]){Personp=newPerson();Teachert=newTeacher();inti;//pointx}}Whicharesyntacticallyvalidstatementat//pointx? A. i = m; B. i = b; C. i = p.a; D. i = p.change(30);
对于下列代码: 1)classPerson{ 2)publicvoidprintValue(inti,intj){//...} 3)publicvoidprintValue(inti){//...} 4)} 5)publicclassTeacherextendsPerson{ 6)publicvoidprintValue(){//...} 7)publicvoidprintValue(inti){//...} 8)publicstaticvoidmain(Stringargs[]){ 9)Persont=newTeacher(); 10)t.printValue(10); 11)} 12)} 第10行语句将调用()语句。
对于下列代码: 1)classPerson{ 2)publicvoidprintValue(inti,intj){//...} 3)publicvoidprintValue(inti){//...} 4)} 5)publicclassTeacherextendsPerson{ 6)publicvoidprintValue(){//...} 7)publicvoidprintValue(inti){//...} 8)publicstaticvoidmain(Stringargs[]){ 9)Persont=newTeacher(); 10)t.printValue(10); 11)} 12)} 第10行语句将调用()语句。
1