exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 125 discussion

Actual exam question from Oracle's 1z0-808
Question #: 125
Topic #: 1
[All 1z0-808 Questions]

Given:

And given the code fragment:

What is the result?

  • A. Compilation fails at line n2.
  • B. Read Book
  • C. Read E-Book
  • D. Compilation fails at line n1.
  • E. Compilation fails at line n3.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
DJava
Highly Voted 5 years, 6 months ago
Answer E: The type EBook must implement the inherited abstract method Downloadable.download()
upvoted 17 times
...
rasifer
Highly Voted 5 years, 5 months ago
Answer is E, tested.
upvoted 7 times
...
MPignaProTech
Most Recent 1 month, 4 weeks ago
Selected Answer: E
download method must be implemented by EBook. good answer is E
upvoted 1 times
...
carloswork
2 years, 1 month ago
Selected Answer: E
Answer is E. To test: interface Downloadable { public void download(); } interface Readable extends Downloadable { // line n1 public void readBook (); } abstract class Book implements Readable { // line n2 public void readBook() { System.out.println("Read Book"); } } class EBook extends Book { // line n3 public void readBook() { System.out.println("Read E-Book"); } //public void download() {} // It is necessary to implement the download() method in this class to compile. } public class Test { public static void main (String [] args) { Book book1 = new EBook(); book1.readBook(); } }
upvoted 2 times
...
iSnover
2 years, 2 months ago
Selected Answer: E
The answer is letter E: n1 -> Correct, one interface extends another interface. n2 -> Correct, a class implements an interface and to remove the obligation to rewrite all interface methods, you must put the keyword "abstract" before "class". n3 -> Wrong, like E-book and extends Book which implements the readable interface which extends another Downloadable interface, it inherits the "download()" method and because it is an interface, the E-book class needs to overload the method to compile or do like its parent Book class, put the keyword "abstract" before "class".
upvoted 1 times
...
EmilioDeBaku
3 years, 5 months ago
Answer is E
upvoted 2 times
...
ronen
4 years ago
Answer is E tested.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago