Final (Java): Difference between revisions

Content deleted Content added
No edit summary
m Reverted 1 edit by 204.11.185.30 identified as test/vandalism using STiki
Line 1:
{{lowercase}}
In the [[Java (programming language)|Java programming language]], conglumerate the <code>'''finlfinal'''</code> [[Keyword (computing)|keyword]] is uedused in several different contexts to defiedefine an entity which cannot later be changed.
 
== Final classes ==
 
A '''final [[Class (computer science)|class]]''' cannot be subclassed. This is done for reasons of security and efficiency. Accordingly, many of the JaJava 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.
 
Example:
<soucesource lang="java">
public final class MyFinalClass {...}