Can an interface hierarchy be used for polymorphism? Explain.

What will be an ideal response?

Yes. A reference variable can use an interface as its type, and can then refer to objects of classes that
implement the interface. In this way, polymorphism works the same as it does with an inheritance hierarchy.

Computer Science & Information Technology

You might also like to view...

When an entire line of text is selected in OpenOffice Writer, a ________ background appears behind that line to the right margin

A) blue B) purple C) gray D) green

Computer Science & Information Technology

You can use the arrow keys to nudge an image as necessary

Indicate whether the statement is true or false

Computer Science & Information Technology