Access Control Modifiers:
Java gives various access modifiers to set access levels for classes, variables, routines and
constructors. The four right to gain access are:
Private: visible to the class.
Default: visible to the bundle. No modifiers are required.
Secured: visible to all subclasses and package.
Public: visible to the world.
Non Access Modifiers:
Java gives various non-access modifiers to attain numerous other usefulness.
Static:
The static modifier for making class variables and methods.
Final
The final modifier for concluding the executions of classes, variables and methods.
Abstract
This modifier is used for for creating abstract methods and classes.
Volatile and Synchronized
These modifiers are typically used for threads.
Do'stlaringiz bilan baham: |