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.
- Click here to get free master-ciw-enterprise-developer Master CIW Enterprise Developer exam practice questions.
- Click here to download scbcd test study guide and practice question.
- Click here to download scdjws test study guide and practice question.
- Click here to download scja test study guide and practice question.
- Get certified in first attempt download scjp - SCJP simulation.
- Click here to download scjp-5-0 test study guide and practice question.
- Pass SUN scmad - SCMAD
- Pass SCWCD in first attampt.
- Get certified in first attempt download CX310-019 - SCJA simulation.
- Get certified in first attempt download CX310-055 - Java 5.0 simulation.
- Download free practice test for SUN SCJP 6.0 exam.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
