What is the difference between Shadowing and Overriding

Q

What is the difference between Shadowing and Overriding ?

✍: Guest

A

Following are the differences between shadowing and overriding :-
? Overriding redefines only the implementation while shadowing redefines the whole element.
? In overriding derived classes can refer the parent class element by using “ME” keyword, but in shadowing you can access it by “MYBASE”.

2007-10-23, 5635👍, 0💬