🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Multiple Inheritance and the Diamond Problem: all 10 questions

Quiz: Multiple Inheritance and the Diamond Problem · Question 8 of 10

How do you call Scanner's version of status() on a Copier object c?

How do you call Scanner's version of status() on a Copier object c?

  1. A.c->Scanner.status()
  2. B.Scanner(c).status()
  3. C.c.Scanner::status()
  4. D.c.status(Scanner)
Answer & explanation

Correct answer: c.Scanner::status()

The scope resolution operator names the base class whose member you want.

Can you get the rest right without peeking?

Take the timed Quiz: Multiple Inheritance and the Diamond Problem quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →