These are the keywords. That they specify how to access or read or retrive or get the members of class or class it self. These are four types in java.
They are
- Private
- Public
- Protected
- Default
Private:Private members are not available any where outside of the class. These are available only inside the declared class.
Public: Public members are always available outside the class to other classes and programs.
Protected: protected members are available within the class as well as access one who extend the protected members declared class only.
DefaultThese members are accesse within the package and one who extends the another package classes also.
No comments:
Post a Comment