OOP IN JAVA : (POLYMORPHISM)

 Polymorphism



Polymorphism is one of the core concepts in OOP languages and describes the concept wherein you can use different classes with the same interface. Each of these classes can provide its own implementation of the interface.

After overriding a method of a super class in a sub class, casting it and making the sub class method run through the super class reference. Using overriding inheritance casting concept 3 to call the sub class from the super class reference.

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object,  for the Example :-


THANKYOU!

Comments

Popular posts from this blog

DEMYSTIFYING THE POWER OF x86 ARCHITECTURE

A GUID TO BEACOMING A SOFTWARE ENGINEER

JAVA LAMBDA EXPRESSION