자격증/OCJP_ExamB
QUESTION 21
IT grow.
2018. 7. 10. 15:21
반응형
QUESTION 21
Given:
abstract public class Employee
{
protected abstract double getSalesAmount();
public double getCommision() {
return getSalesAmount() * 0.15;
}
}
class Sales extends Employee {
17. // insert method here }
Which two methods, inserted independently at line 17, correctly complete the Sales class? (Choose two.)
A. double getSalesAmount() { return 1230.45; }
B. public double getSalesAmount() { return 1230.45; }
C. private double getSalesAmount() { return 1230.45; }
D. protected double getSalesAmount() { return 1230.45; }
Solution : BD
반응형