Java

Java-Polymorphsim: What is Polymorphism in Java?



Polymorphism: Means “many forms” and it occurs when we have many classes that are related to each other by inheritance. The most common use of polymorphism in OOP when a parent class reference is used to refer to a child class object.
Ex: WebDriver driver =new chromeDriver();

There are 2 types of Polymorphism:
1. Run time or Overriding
2. Compile time or Over loading

————————————————————————
Follow Us on Social…

Leave a Reply

Your email address will not be published. Required fields are marked *