Java Modifiers Types
So, folks.. first of all what goes through your mind when you hear “modify”, well for me when I hear that word the simplest meaning is to “change”. So what is a modifier, basically modifiers (In java) are a keywords that you can add to those definitions to change their meanings. In the java language there are a wide range of variety for java modifiers types, including the following modifiers :
- Java Access Modifiers
- Java Non Access Modifiers
- Content are Visible to the package, the default. And no modifiers are needed here.
- Private : Contents are visible to its class only
- Content are Visible to everyone and basically the world (public).
- Protected : Contents are visible to the package and all of its subclasses
- The static modifier is usually used to create class methods and variables.
- The final modifier is usually used to finalize the implementation of classes, methods and of course variables.
- The synchronized and volatile modifiers (probably the least modifiers that you’ve ever heard) and of course this modifiers are used for threads.
- The abstract modifier is to create abstract classes and methods.