Return to site

JAVA CERTIFICATION QUESTION: create methods with arguments and return values, including overloaded methods

· java,ocp

Given:

And this code fragment:

JetEngine e = new JetEngine();

new Car().setEngine(e);

What is the result? Choose one.

A) I have unknown engine

B) I have generic engine: GE-001

C) I have combustion engine: CE-002

D) I have generic engine: CE-002

E) I have combustion engine: JE-003

 

The answer is C

 

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK