试题详情
- 单项选择题 类Teacher: class Teacher{ String name; float salary; Teacher(String name){ this.name = name; } Teacher(String name,float salary){ this.name = name; this.salary = salary; } } 执行语句Teacher t = new Teacher(“Tom”,2000.0f);后,字段salary的值是哪一项?()
A、 2000.0f
B、 0.0f
C、 null;
D、 2000
- A
关注下方微信公众号,在线模考后查看
热门试题