Content deleted Content added
No edit summary Tags: Mobile edit Mobile web edit |
No edit summary |
||
Line 2:
In the [[Java (programming language)|Java programming language]], the <code>'''final'''</code> [[Keyword (computing)|keyword]] is used in several different contexts to define an entity which may only be assigned once.
Once a <code>'''final'''</code> variable has been assigned, it always contains the same value. If a <code>'''final'''</code> variable holds a reference to an object, then the state of the object may be changed by operations on the object, but the variable will always refer to the same object. This applies also to arrays, because arrays are objects; if a <code>'''final'''</code> variable holds a reference to an array, then the components of the array may be changed by operations on the array, but the variable will always refer to the same array.<ref>Java Language Specification
==Final classes==
|