What is modifier?

June 12th, 2009 by uCertify Leave a reply »

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.
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.
  • Share/Bookmark
Advertisement

Leave a Reply

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