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++
1 Odpowiedź
+ 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