Final Classes
A final class cannot be subclassed. This is done for reasons of security and efficiency. Accordingly, many of the Java standard library classes are final, for example java.lang.System and java.lang.String. All methods in a final class are implicitly final.
Example:
public final class MyFinalClass {...} public class ThisIsWrong extends MyFinalClass {...} // forbiddenRestricted subclasses are often referred to as "soft final" classes.
Read more about this topic: Final (Java)
Famous quotes containing the words final and/or classes:
“It is the nature of aphoristic thinking to be always in a state of concluding; a bid to have the final word is inherent in all powerful phrase-making.”
—Susan Sontag (b. 1933)
“Classes struggle, some classes triumph, others are eliminated. Such is history; such is the history of civilization for thousands of years.”
—Mao Zedong (18931976)