Declaring variables as final but not static and not assigning it any initial value allows different constant values for each instance of the class to be assigned in the constructor.
A final variable that refers to an object always refers to the same object. However, values within the object to which it points may change. Similarly, a final variable that refers to an array always refers to the same array, even though elements in that array can change.
Wednesday, September 20, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment