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:
“Her wrongs are ... indissolubly linked with all undefended woe, all helpless suffering, and the plenitude of her rights will mean the final triumph of all right over might, the supremacy of the moral forces of reason and justice and love in the government of the nation. God hasten the day.”
—Anna Julia Cooper (18591964)
“Genocide begins, however improbably, in the conviction that classes of biological distinction indisputably sanction social and political discrimination.”
—Andrea Dworkin (b. 1946)