7. Explain about private?
Answer
The 'private' is a Access Modifier. THIS IS A LEAST ACCESS MODIFIER.
Given to
- Methods
- Variables
- Inner classes
If a member variable is defined as private, available to all methods of the class scope.
You cannot assign it to top level classes ( except for inner classes).
A child class cannot access private features of parent class.
|