Oracle
1Z0-819 · Question #24
1Z0-819 Question #24: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #24. The question stem and answer options stay visible for context.
Question
Given:
public class Foo {
public void foo(Collection arg) {
System.out.println("Bonjour le monde!");
}
}
and
public class Bar extends Foo {
public void foo(Collection arg) {
System.out.println("Hello world!");
}
public void foo(List arg) {
System.out.println("Hola Mundo!");
}
}
and
Foo f1 = new Foo();
Foo f2 = new Bar();
Bar b1 = new Bar();
Collection<String> c = new ArrayList<>();
Which three are true? (Choose three.)
Options
- Ab1.foo(c) prints Bonjour le monde!
- Bf1.foo(c) pr ts Hello world!
- Cf1.foo(c) prints Hola Mundo!
- Db1.foo(c) prints Hello world!
- Eb1.foo(c) prints Hola Mundo!
- Fb1.foo(c) prints Olá Mundo!
- Gf2.foo(c) prints Bonjour le monde!
- Hf2.foo(c) prints Hello world!
- If1.foo(c) prints Bonjour le monde!
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 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.