1/20
Looks like no tags are added yet.
Polymorphism
Means "many forms." It allows objects from different subclasses to be treated collectively using their common superclass type. This makes it possible to write generic code instead of creating separate code for every subclass.
Superclass Type
A general class type that can be used to reference objects belonging to its subclasses.
Polymorphic Reference
A superclass reference variable that refers to a subclass object.
Generic Coding
The practice of writing code that works with multiple related object types through their common superclass. It reduces the need to write separate operations for each subclass.
Shared Method
A method that belongs to a common superclass and can be used by different subclasses. Each subclass may provide its own implementation.
Polymorphic Behavior
The ability of different objects to respond differently when the same method is called.
Method Resolution
The process of determining which method implementation should execute when a method is called.
Method Overriding
Occurs when a subclass provides its own implementation of an inherited method using a compatible method declaration. It allows a subclass to change or specialize the behavior defined by its superclass.
Runtime Method Selection
The process in which Java determines which overridden instance method to execute based on the actual object's class during program execution.
@Override
An annotation placed before a method to indicate that it is intended to override a method inherited from a superclass or declared in an interface. It helps the compiler detect incorrect method declarations.
Method Signature Matching
The requirement that an overriding method must match the inherited method's name and parameter types. If the declaration does not correctly override a method, the compiler can detect the problem when @Override is used.
Compile-Time Checking
The process of checking code for errors before execution. The @Override annotation provides an additional check that helps detect incorrect attempts to override methods.
super.method()
A way to invoke an inherited superclass method from within a subclass. It is useful when an overriding method wants to reuse the original behavior while adding its own operations.
Overridden Method
A superclass method whose behavior has been redefined by a subclass.
Interface
A Java type that defines a contract specifying methods that implementing classes must provide. Presented as collections of method signatures without shared implementations.
Method Contract
A requirement established by an interface that specifies which operations an implementing class must support. The class is responsible for supplying the appropriate implementation.
interface
A Java keyword used to declare an interface.
implements
A Java keyword used when a class agrees to follow the contract defined by an interface.
Multiple Inheritance Through Interfaces
A mechanism that allows a class to inherit multiple interface contracts. Java supports implementing multiple interfaces even though a class can directly extend only one superclass.
Single Class Inheritance
A Java restriction that allows a class to directly extend only one superclass. F
Runnable Interface
A standard Java interface that declares the run() method. It allows classes to define tasks that can be executed by a thread.