Question 10 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 10 of 130 from exam 1Z0-809: Java SE 8 Programmer II

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.print1n ("OFF"); }
y

Engine. java!
public class Engine{
Operator m = new EngineOperator();
public void operate() {
m.turnON () 7
m.turnOFF ()
Engine carEngine = new Engine();
carEngine.operate();

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.