Overriding involves the creation of two or more methods with the same name and same signature in different classes (one of them should be parent class and other should be child).
Note:-
Method heading is same + Method body is different
The process of redefining original method into various implementing or definitions, this process is
know as method overriding
Overloading is a concept of using a method at different places with same name and different signatures within the same class.
Overloading is a concept of using a method at different places with same name and different signatures within the same class.
No comments:
Post a Comment