Or What is difference between overloading and overriding? Method overloading: When 2 or more methods in a class have the same method names with different arguments, it is said to be method overloading. Overloading does not block inheritance from the superclass. Overloaded methods must have different method signatures Method overriding : When a method in a class has the same method name with same arguments as that of the superclass, Basically overloading and overriding are different aspects of polymorphism.
it is said to be method overriding. Overriding blocks inheritance from the superclass. Overridden methods must have same signature.
static/early binding polymorphism: overloading
dynamic/late binding polymorphism: overriding
Click Here to See Answer .....
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.
0 comments:
Post a Comment