Difference between Function overloading, Function overriding, Function shadowing,Function hiding. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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