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:
“For I had expected always
Some brightness to hold in trust,
Some final innocence
To save from dust;”
—Stephen Spender (19091995)
“The most powerful lessons about ethics and morality do not come from school discussions or classes in character building. They come from family life where people treat one another with respect, consideration, and love.”
—Neil Kurshan (20th century)