试题详情
- 单项选择题 1. public class Employee { 2. String name; 3. double baseSalary; 4. Employee(String name, double baseSalary) { 5. this.name = name; 6. this.baseSalary = baseSalary; 7. } 8. } And: 1. public class Salesperson extends Employee { 2. double commission; 3. public Salesperson(String name, double baseSalary, 4. double commission) { 5. // insert code here 6. } 7. } Which code, inserted at line 7, completes the Salesperson constructor?()
A、 this.commission = commission;
B、 superb(); commission = commission;
C、 this.commission = commission; superb();
D、 super(name, baseSalary); this.commission = commission;
E、 super(); this.commission = commission;
F、 this.commission = commission; super(name, baseSalary);
- D
关注下方微信公众号,在线模考后查看
热门试题