Oracle
1Z0-808 · Question #41
1Z0-808 Question #41: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-808 to reveal the answer and full explanation for question #41. The question stem and answer options stay visible for context.
Working with Inheritance
Question
Given the code fragment:
abstract class Planet {
protected void revolve() { //line n1
}
}
abstract void rotate();
class Earth extends Planet {
void revolve() { //line n3
}
}
protected void rotate() { //line n4
}
Which two modifications made independently, enable the code to compile?Options
- AMake the method at line n1 public.
- BMake the method at line n2 public.
- CMake the method at line n3 public.
- DMake the method at line n3 protected.
- EMake the method at line n4 public.
Unlock 1Z0-808 to see the answer
You've previewed enough free 1Z0-808 questions. Unlock 1Z0-808 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.
Topics
#access modifiers#method overriding#abstract methods#inheritance