Final Classes

Final classes can not be inherited. The final keyword is used to define a final class. Most of the classes in the java.lang package are defined as final so that they can not be inherited. Here is the definition of the String class :

public final class String{
 //some methods omitted for readability's sake
}

results matching ""

    No results matching ""