What is modifier?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is modifier?

Rating:

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.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.