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.
[HD Pg 0, Sec. 4.4.2 - scope-and-visibility]
Moderator: admin
-
- Posts: 21
- Joined: Mon Sep 30, 2019 9:48 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: [HD Pg 0, Sec. 4.4.2 - scope-and-visibility]
Explained in detail with an example in Section 12.6 Distinguish overloading, overriding, and hiding.
-
- Posts: 21
- Joined: Mon Sep 30, 2019 9:48 pm
- Contact:
Re: [HD Pg 0, Sec. 4.4.2 - scope-and-visibility]
ok, thank you.
Who is online
Users browsing this forum: No registered users and 20 guests