• 2021-04-14
    【单选题】定义一个学生类Student,则初始化一个学生对象的语句是(
    A. Student s ; B. Student s = new Student(); C. Student s = new student(); D. Student s = s.student();
  • Student s = new Student();

    内容

    • 0

      【单选题】类Teacher和Student是类Person的子类; Person p; Teacher t; Student s; //p, t and s 非空 if(t instanceof Person) { s = (Student)t; } 最后一条语句的结果说法正确是()。 A. 将构造一个Student对象 B. 表达式是合法的 C. 表达式是错误的 D. 编译时正确,但运行时错误

    • 1

      以下变量定义,错误的是: A: struct student{int num, char name[20];} s; B: struct {int num, char name[20];} s; C: struct student{int num, char name[20];}; struct student s; D: struct student{int num, char name[20];} ; student s

    • 2

      Conversation 7~11:Listen to part of a conversation between a studentand a professor. What do the student and the professor mostly discuss A: The student’s need to attend class B: The student’s potential grade in class C: The student’s stay in the hospital D: The student’s absence from class

    • 3

      This book isthat ______. A: the student B: the student’s C: the students’

    • 4

      定义一个学生类Student,则初始化一个学生对象的语句是( )