Final (Java): Difference between revisions

Content deleted Content added
No edit summary
m Robot-assisted disambiguation (you can help!): Java programming language
Line 1:
In the [[Java (programming language)|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 efficiency. Accordingly, many of the Java standard library classes are final, for example {{Javadoc:SE|package=java.lang|java/lang|System}} and {{Javadoc:SE|package=java.lang|java/lang|String}}. All methods in a final class are implicitly final.