Oracle
1Z0-809 · Question #266
1Z0-809 Question #266: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #266. The question stem and answer options stay visible for context.
Question
Given the content of Operator.java, EngineOperator.java, and Engine.java files:
Operator.java:
public abstract class Operator {
protected void turnON();
protected void turnOFF();
}
EngineOperator.java:
public class EngineOperator extends Operator{
public final void turnON() { System.out.print("ON "); }
public final void turnOFF() { System.out.println("OFF"); }
}
Engine.java:
public class Engine{
Operator m = new EngineOperator();
public void operate() {
m.turnON();
m.turnOFF();
}
}
What is the result?
Options
- AThe Engine.java file fails to compile.
- BThe EngineOperator.java file fails to compile.
- CThe Operator.java file fails to compile.
- DON OFF
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.