Final (Java): Difference between revisions

Content deleted Content added
Ezrarez (talk | contribs)
m +static
m bypass dab
Line 15:
}
 
A '''final [[variable]]''' is a [[constant]]. It must be assigned a value at [[declaration (computer science)|declaration]], and the variable can later be used but not assigned a new value. [[Local variable|Local variables]] (for example, variables in loops) cannot be declared final.
 
Example: