Difference between over loading and over ridding?

Answer Posted / rameshwar gaikwad

Difference

Method OverLoading
1. Same method name with different number of argument
2. Number of argument with different datatype
3. Each method may returns different type of value
4. All overloaded methods founds to be in one class.

Method OverRiding
1. Same method name with same number of argument
2. Number of argument with same datatype
3. Each method must returns same type of value
4. Each overrided method of base class founds in respective
derived class.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between inheritance and polymorphism?

794


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1905


Can we create object of interface?

860


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2148


What does and I oop mean in text?

871


How do you achieve polymorphism?

837


What is the significance of classes in oop?

823


What is overloading and its types?

839


is there any choice in opting subjects like 4 out of 7

1947


What is the real time example of inheritance?

880


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2294


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2077


What is encapsulation example?

789


What is an example of genetic polymorphism?

889


What is encapsulation with real life example?

800