class A
{
void display()
{
System.out.println("final method in super class");
}
final void show()
{
System.out.println("Not final method so it may be overridden");
}
}
class B extends A
{
void display()
{
System.out.println("Overridden method in sub class");
}
/*void show()
{
System.out.println("This method will give error as we cannot override final method");
} */
}
class Main
{
public static void main(String args[])
{
B obj= new B();
obj.display();
obj.show();
}
}