类 Teacher 和 Student 是类 Person 的子类; Teacher t; Student s; // t and s are all non-null. if (t instanceof Person ){ s=(Student)t; } 最后一条语句的结果是:
A.将构造一个Student 对象;
B.表达式是合法的;
C.表达式是错误的;
D.编译时正确, 但运行时错误。
多选题定义字符数组正确的是()。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
单选题Now little has been done to ______.A decide a student’s jobB test a student’s abilityC test a student’s knowledgeD test a student’s memory
单选题All of Mark's former students go to college. If the statement above is true, which of the following must also be true?A If Ethan was not Mark's student, then he& is not going to college.B If Joyelle goes to college, then she was& not Mark's student.C If Ginger goes to college, then she was& Mark's student.D If Stephanie was Mark's student, then& she is not going to college.E If Steve does not go to college, then he& was not Mark's student.
单选题类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编译时正确,但运行时错误。