Tuesday, 9 June 2015

Variable modifiers in java

This article explains about variable modifiers available in java with example. 

 

 There are seven possible modifiers that may precede the declaration of a variable as listed below.


 Keyword
Description 
Is a constant 
Can be accessed only by code in the same class 
Can be accessed only by code in a subclass or the same package 
Can be accessed by any other class 
Is not an instance variable 
Is not part of the persistent state of this class 
Can change unexpectedly 

No comments:

Post a Comment