Final Java Keyword

Compiled By Unknown - No Comments
The final keyword may be applied to a class, indicating the class may not be extended (subclassed). The final keyword may be applied to a method, indicating the method may not be overridden in any subclass. Remarks
  • A class may never be both abstract and final. abstract means the class must be extended, while final means it cannot be.
  • A method may never be both
  • public final class MyFinalClass
    {
    }
    public class MyClass
    {
    public final String myFinalMethod()
    {
    
    }
    }
    


    Tags:

    No Comment to " Final Java Keyword "