Difference b/w Overloading & Overriding
Difference between overloading and overriding is as follows...
- In overloading, there is a relationship between methods available in the same class
- Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass.
- In overloading, separate methods share the same name whereas in overriding,subclass method replaces the superclass.
- Overloading must have different method signatures whereas overriding must have same signature.
No comments:
Post a Comment