Overloading
a)In this approach we can define multiple methods with same name changing their signature means different parameters
b) This can be performed within class as well as within child class
c) Doesn't require any permission from parent for overloading its method in child
Overriding
a.It is an approach of defining multiple methods with same name and same signature
b. this can be performed only under child class
c. Requires an explicit permission from parent to override its methods in child
a)In this approach we can define multiple methods with same name changing their signature means different parameters
b) This can be performed within class as well as within child class
c) Doesn't require any permission from parent for overloading its method in child
Overriding
a.It is an approach of defining multiple methods with same name and same signature
b. this can be performed only under child class
c. Requires an explicit permission from parent to override its methods in child
No comments:
Post a Comment