0

What is the difference between function overriding and function overloading . Plz also specify the uses of each of these two..

5th Dec 2016, 11:02 AM
Learner
Learner - avatar
2 Antworten
+ 3
overriding : rewrite the function code , usefull at heritage. overloading : write another function, with the same name, but with diferent type or quantity of parammeters. usefull when you need to repeat the same operation, but with diferent types.
5th Dec 2016, 11:09 AM
Nahuel
Nahuel - avatar
0
overriding : rewrite the function code with same name and with same set of parameters also. it generally come into action in the case of inheritance. overloading : write another function, with the same name, but with diferent sets of parameters. usefull when you need to repeat the same operation, but with diferent types of data.
7th Dec 2016, 6:29 PM
Dharm Vashisth
Dharm Vashisth - avatar