Polymorphism
- is a concept where one object can have many forms. The most common use of polymorphism in Oops occurs when a parent class reference is used to refer to a child class object.
- static
- dynamic
Inheritance
- is a mechanism in which one object acquires all the properties and behaviors of a parent object. The idea behind inheritance in Java is that you can create new classes that are built upon existing classes and same properties needed in multiple class you need not need to write multiple times.
- is a concept where one object can have many forms. The most common use of polymorphism in Oops occurs when a parent class reference is used to refer to a child class object.
- static
- dynamic
Inheritance
- is a mechanism in which one object acquires all the properties and behaviors of a parent object. The idea behind inheritance in Java is that you can create new classes that are built upon existing classes and same properties needed in multiple class you need not need to write multiple times.
No comments:
Post a Comment