Accessibility
This lesson discusses the various accessibility levels in Java.
We'll cover the following...
Question # 1
How can access to classes, class variables and methods be controlled?
Access level modifiers determine whether other classes can use a particular field or invoke a particular method in another class. There are two levels of access control, the top level and the member level.
Question # 2
List the access modifiers in Java?
There are four accessibility levels in Java. They are listed below in order of increasing restrictiveness:
- public
- package private
- protected
- private
Question # 3
What are the top-level ...