Final Methods in Java


Source Code

//Final Methods in Java
class Super
{
    public void display()
    {
        System.out.println("I am Super Display");
    }
    final void finalDisplay()
    {
        System.out.println("I am Super Final Display");
    }
}
class sub extends Super
{
    public void display()
    {
        System.out.println("I am Sub Display");
    }
}
 
public class finalMethods {
    public static void main(String args[])
    {
        sub o =new sub();
        o.display();
        o.finalDisplay();
    }
}
 
To download raw file Click Here

Basic Programs



Learn All in Tamil © Designed & Developed By Tutor Joes