niusouti.com
参考答案和解析
正确答案:A
更多“The teacher, as well as all his students, _____ by the dancer’s performance. ”相关问题
  • 第1题:

    类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.编译时正确,但运行时错误。


    表达式是错误的

  • 第2题:

    类 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.编译时正确, 但运行时错误。


    编译时正确,但运行时错误

  • 第3题:

    声明并创建一个学生类Student的对象s,下列语法格式正确的是()。

    A.Student s = Student();

    B.Student s;

    C.Student s = new Student();

    D.Student s = new ();


    C

  • 第4题:

    类Teacher和Student都是类Person的子类 Person p; Teacher t; Student s; 若p,t和s都是非空值 if(t instanceof Person) { s = (Student)t; } 若默认new时声明的都是本类,这个语句导致的结果是()

    A.将构造一个Student对象

    B.表达式合法

    C.编译时非法

    D.编译时合法而在运行时可能非法


    C

  • 第5题:

    以下选项中哪个是Student类创建对象的正确语句?()

    A.Student s1=new Student();

    B.s1=new Student();

    C.s1=Student();

    D.Student s1=Student();


    Student s1=new Student( );

  • 第6题:

    以下选项中哪个是Student类创建对象的正确语句?()

    A.s1=new Student();

    B.Student s1=new Student();

    C.s1=Student();

    D.Student s1=Student();


    AB