Browsing tag: method overriding

Method overloading vs method overriding

Overloading and Overriding In Java


Method Overloading : Methods  have business logic that manipulates data(instances variable).   Methods would have method name, input arguments, return type and method body.   Sometimes we require to write two methods which are logically same but differ by input argument list.   Let us take class “Calculator”. public int add(int a, int b){ return a+ b; } public