Hi, I have a question pertaining to access modifiers that I was hoping to get rectified.
On page 203, in section 10.2.2, which talks about the access modifiers, it is explicitly stated that there are three access modifiers: private, protected, and public. Its also mentioned that if a variable doesnt have either of these three, that initself is an indication of a modifier known as default.
On the next page, it is stated under the exam tip that we should be wary of the test tricking us by using non existent modifiers such as "default"
So does this mean that even though the absence of private, protected, and/or public conceptually indicates a default modifier onto a variable... default is not an actual modifier that should be specified?
Thanks
Question about access modifiers
Moderator: admin
-
- Posts: 12
- Joined: Sun May 28, 2023 1:17 pm
- Contact:
-
- Site Admin
- Posts: 10152
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: Question about access modifiers
Right, default is not an actual modifier. The absence of any modifier provides default access.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 2 guests