What is polymorphism ?
- It means the same method name can behave differently based on the object that is calling polymorphism.
Types of Polymorphism ?
- Compile-Time Polymorphism (Method Overloading)
- Runtime Polymorphism (Method Overriding)
Method overloading :
- Method overloading is same method name and different type of arguments or different number of arguments in same class.
Method overriding :
- Method overriding is same method signature(method name & arguments) in different class.
Top comments (0)