Oracle
1Z0-851 · Question #124
1Z0-851 Question #124: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #124. The question stem and answer options stay visible for context.
Question
Given: class Employee { String name; double baseSalary; Employee(String name, double baseSalary) { this.name = name; this.baseSalary = baseSalary; } } 09. public class SalesPerson extends Employee { 10. double commission; 11. 12. public SalesPerson(String name, double baseSalary, double commission) { 13. // insert code here 14. } 15. } Which two code fragments, inserted independently at line 13, will compile? (Choose two.)
Options
- Asuper(name, baseSalary);
- Bthis.commission = commission;
- Csuper(); this.commission = commission;
- Dthis.commission = commission; super();
- Esuper(name, baseSalary); this.commission = commission;
- Fthis.commission = commission; super(name, baseSalary);
- Gsuper(name, baseSalary, commission);
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.