Examlex

Solved

When You Extend an Interface, You Must Implement All the Methods

question 36

Multiple Choice

When you extend an interface, you must implement all the methods defined in the interface. If you are interested in only one or two mouse events, you can extend the ________ class which implements the MouseListener interface, but does not require you to write all the functions in the interface.


Definitions:

Superclass

The class from which a subclass inherits fields and methods, often referred to as a parent class.

Private Members

Variables or methods of a class that cannot be accessed directly from outside the class, intended to protect the internal state or behavior of the class.

Superclass

Superclass, also known as a parent class, is a class from which other classes inherit properties and methods in object-oriented programming.

Reserved Word Super

In Java, "super" is a reserved keyword used to refer to the immediate parent class object.

Related Questions