Difference between method Overloading and Overriding.
Method Overloading
|
Method Overriding
|
1) Method overloading increases the readability of the program.
|
Method overriding provides the specific implementation of the
method that is already provided by its super class.
|
2) method overloading is occurs within the class.
|
Method overriding occurs in two classes that have IS-A
relationship.
|
3) In this case, parameter must be different.
|
In this case, parameter must be same.
|
Comments
Post a Comment