HTML & JS
class Override01
{
     public void Display()
     {
         System.out.println("We are with Override method....");
     }
}
class TestOverride01 extends Override01
{
     @Override
     public void Display(int x)
     {
         System.out.println("We r in Test Override.......");
     }
 
     public static void main(String args[])
     {
         TestOverride01 t1 = new TestOverride01();
         t1.Display();
     }
}

Generated URL:

Output:

No Output
Report Bug