Oracle
1Z0-809 · Question #165
1Z0-809 Question #165: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #165. The question stem and answer options stay visible for context.
Question
Given:
interface Downloadable {
public void download();
}
interface Readable extends Downloadable {
public void readbook();
}
abstract class Book implements Readable {
public void readbook() {
System.out.println("Read Book"); // line n2
}
}
class EBook extends Book {
public void download() {
System.out.println("Read E-Book"); // line n3
}
}
And given the code fragment:
Book book1 = new EBook();
book1.readbook();
What is the result?
Options
- ACompilation fails at line n2.
- BRead E-Book
- CCompilation fails at line n1.
- DCompilation fails at line n3.
- ERead Book
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.