A.0
B.null
C.false
D.编译错误
第1题:
A.Studentstu=newStudent(“Tom”,23);stu.study(“数学”);
B.Student.study(“数学”);
C.Studentstu=newStudent(“Tom”,23);stu.study();
D.Studentstu=newStudent(“Tom”,23);Stringresult=stu.study(“数学”);
第2题:
A.public Person(){}
B.public Person(String name,int age) { this.name = name; this.age = age; }
C.public Person(int age,String name) { this.age = age; this.name = name; }
D.public Person(String name) { this.name = name; }
第3题:
2、假设student是一个含有name与age属性的结构体,如何调用学生的年龄信息? struct Student{ char name[20]; int age; }
A.student.age
B.student->age
C.student[age]
D.student(age)
第4题:
A.0
B.null
C.false
D.编译错误
第5题:
以下选项中哪个是Student类创建对象的正确语句?()
A.s1=Student();
B.Student s1=new Student();
C.s1=new Student();
D.Student s1=Student();