Page 1 of 1

[HD Pg 0, Sec. 4.4.2 - scope-and-visibility]

Posted: Mon Jan 06, 2020 11:47 pm
by nk2164
In this chapter , you refer to the terms shadowing and hiding. You said they have different meaning in Java . I understand your explanation of shadowing (a variable in a method shadows a variable with the same name declared at class level).

What about hiding ? can you please give an example ? . Thank you.

Re: [HD Pg 0, Sec. 4.4.2 - scope-and-visibility]

Posted: Mon Jan 06, 2020 11:54 pm
by admin
Explained in detail with an example in Section 12.6 Distinguish overloading, overriding, and hiding.

Re: [HD Pg 0, Sec. 4.4.2 - scope-and-visibility]

Posted: Tue Jan 07, 2020 12:12 am
by nk2164
ok, thank you.