Modifier is a Java keyword that affects the behavior of the feature it precedes. Java has a number of modifiers, which are as follows:
- final: It defines a constant feature.
- private: It specifies that a feature can be accessed only by code in the same class.
- protected: It specifies that a feature can be accessed only by code in a subclass or the same package.
- public: It specifies that a feature can be accessed by any other class.
- static: It specifies that a feature belongs to the class in which it is declared, and not to the individual instances of that class.
- transient: It specifies that a feature is not part of the persistent state of the class.
- volatile: It specifies that a feature can change unexpectedly.
- abstract: It specifies that a feature is somehow incomplete and needs further information before use.
- synchronized: It ensures that only one thread can access a method or object, at a particular time.
- native: Only methods can be declared as native. The native modifier specifies that the body of the method is defined elsewhere in a library, entirely outside the Java Virtual Machine.
- strictfp: It specifies that all of the expressions in all of the methods of the class are strictly floating-point. The JVM sticks to the Java specifications and returns the consistent value independent of the platform.
- Download free practice test for CIW Master CIW Enterprise Developer exam.
- Click here to get free scbcd SCBCD exam practice questions.
- Download free practice test for SUN SCDJWS exam.
- Get certified in first attempt download scja - SCJA simulation.
- Download free practice test for scjp SCJP exam.
- Best exam simulation SUN scjp-5-0 download free trial.
- Become SUN SCMAD certified.
- Pass SCWCD in first attampt.
- Pass SUN CX310-019 - SCJA
- Download free practice test for SUN Java 5.0 exam.
- Pass SCJP 6.0 in first attampt.