0

Difference between Function overloading, Function overriding, Function shadowing,Function hiding.

What is the difference between Function overloading, Function overriding, Function shadowing,Function hiding, Actually I know the each term but not able to differentiat between them have little bit confusion while differentiating. Please anyone explain with example in Java or C++

3rd Jul 2021, 8:58 AM
ㅤㅤㅤㅤㅤㅤ
ㅤㅤㅤㅤㅤㅤ - avatar
1 ответ
+ 3
Overloading ... Same method in the same class with different parameters Overriding ... derived class redefines a method (same sign) of the base class With overriding the base class method is hided or shadowed. In general you hide or shadow an element when a inner scope redefines an alement of the outer scope
3rd Jul 2021, 3:18 PM
Ciro Pellegrino
Ciro Pellegrino - avatar