OA. free
Free
Ola Core Computer Science Core Computer Science Medium

Consider interface ABC declaring methods myMethod() and getInfo().

Ola technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Consider interface ABC declaring methods myMethod() and getInfo(). Abstract class xyz implements ABC. Class Test extends xyz and implements getInfo() printing 'XYZ'.

Which polymorphic instantiation correctly calls getInfo() to print 'XYZ'?

Choose one option.
Show answer & explanation
Answer: A. interface ABC { void myMethod(); void getInfo(); }

Accurate technical and quantitative evaluation based on foundational principles.

Step-by-step Derivation:
Step 1: Formulate problem conditions.
Step 2: Apply logical deduction.
Step 3: Conclude correct option.