Final (Java): Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 5:
= Final classes =
 
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 finalanal.
 
Example: