类Teacher和Student是类Person的子类; Person p; Teacher t; Student s; //p, t and s are all non-null. if(t instanceof Person) { s = (Student)t; } 最后一句语句的结果是:()
A.将构造一个Student对象;
B.表达式是合法的;
C.表达式是错误的;
D.编译时正确,但运行时错误。
单选题The teacher-student _____ in China’s universities is much lower than that in the U.S.A rateB rankC ratioD range
点击查看答案
多选题定义字符数组正确的是()。Achars[]=Student;Bchars[7]=Student;Cchars[7]={’S’,’t’,’u’,’d’,’e’,’n’,’t’};Dchars[]={Student};
单选题What is the teacher doing in terms of error correction?“ S: I go to the theatre last night.”T: You GO to the theatre last night?A.Correcting the student’s mistake.B.Hinting that there is a mistake.C.Encouraging peer correction.D.Asking the student whether he really went to the theatre.A AB BC CD D
多选题Which are syntactically valid statement at// point x?() class Person { private int a; public int change(int m){ return m; } } public class Teacher extends Person { public int b; public static void main(String arg[]){ Person p = new Person(); Teacher t = new Teacher(); int i; // point x } }Ai = m;Bi = b;Ci = p.a;Di = p.change(30);Ei = t.b.
单选题创建一个名为student的新类,保存新类的类库名称是mylib,新类的父类是Person,正确的命令是( )。A CREATE CLASS mylib OF student As PersonB CREATE CLASS student OF Person As mylibC CREATE CLASS student OF mylib As PersonD CREATE CLASS Person OF mylib As student
单选题对于下列代码: 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行语句将调用哪行语句?()Aline 2Bline 3Cline 6Dline 7
单选题类Teacher和Student是类Person的子类; Person p; Teacher t; Student s; //p, t and s are all non-null. if(t instanceof Person) { s = (Student)t; } 最后一句语句的结果是:()A将构造一个Student对象;B表达式是合法的;C表达式是错误的;D编译时正确,但运行时错误。