Dayrvia
Jv

Java · Overriding · Practice questions

Try 2 questions on Java · Overriding, then read the explanations and review the related concepts.

Practice questions

Choose an answer and move to the next question. Grade the last one to see explanations and review links.

2 questions
Q1 Memo overrides the instance method text() from Note. Which implementation does n.text() call?
Note n = new Memo();
Q2 What does a.id() return?
class A { String id() { return "A"; } }
class B extends A { String id() { return "B"; } }
// inside main
A a = new B();
Original practice questions written for Dayrvia.