exam questions

Exam 1z0-809 All Questions

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

Exam 1z0-809 topic 1 question 176 discussion

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

Given:
public class Canvas implements Drawable {
public void draw () { }
}
public abstract class Board extends Canvas { }
public class Paper extends Canvas {
protected void draw (int color) { }
}
public class Frame extends Canvas implements Drawable {
public void resize () { }
abstract void open ();
}
public interface Drawable {
public abstract void draw ();
}
Which statement is true?

  • A. Board does not compile.
  • B. Paper does not compile.
  • C. Frame does not compile.
  • D. Drawable does not compile.
  • E. All classes compile successfully.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
steefaand
5 months, 4 weeks ago
Selected Answer: C
C is true as nonabstract class can't have abstract methods.
upvoted 1 times
...
lchowen
1 year, 10 months ago
Answer is C. B is wrong because if you read carefully, Paper class overloads the draw method with draw(int color). It's not overriding the draw() method. So paper class compiles
upvoted 1 times
...
MatthewTannous
1 year, 12 months ago
Both B&C , B-> overwriting a public method with a protected method, C-> Frame is not abstract class
upvoted 2 times
...
jduarte
3 years, 3 months ago
answer is C. the class Frame is not abstract then open method open can´t abstract.
upvoted 4 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