Oracle
1Z0-851 · Question #195
1Z0-851 Question #195: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #195. The question stem and answer options stay visible for context.
Question
Given: class Thingy { Meter m = new Meter(); } class Component { void go() { System.out.print("c"); } } class Meter extends Component { void go() { System.out.print("m"); } } class DeluxeThingy extends Thingy { public static void main(String[] args) { DeluxeThingy dt = new DeluxeThingy(); dt.m.go(); Thingy t = new DeluxeThingy(); t.m.go(); } } Which two are true? (Choose two.) A.
Options
- BThe output is mm.
- CThe output is mc.
- DComponent is-a Meter.
- EComponent has-a Meter.
- FDeluxeThingy is-a Component.
- GDeluxeThingy has-a Component.
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.