Final (Java): Difference between revisions

Content deleted Content added
m bypass dab
Spelling
Line 1:
In the [[Java programming language]], the <code>'''final'''</code> [[Keyword (computer)|keyword]] is used in several different contexts to define an entity which cannot later be changed.
 
A '''final [[Class (computer science)|class]]''' cannot be [[Subclass (computer science)|subclassed]]. This is done for reasons of security or efficiancyefficiency. Accordingly, many of the Java standard library classes are final, for example [http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html java.lang.System] and <code>[[java.lang.String]]</code>. All methods in a final class are implicitly final.
 
Example: