class SuperClass
{
	void disp()
	{
		System.out.println("This is superclass");
	}
}
class MethodOveride extends SuperClass
{
	void overide() 
	{
		System.out.println("Display from overide");
		disp();
		super.disp();
		this.disp();
	}
	void disp ()
	{
		System.out.println("This is subclass");
	}
	public static void main (String args[]) 
	{
		MethodOveride t1= new MethodOveride();
		t1.overide();
	}
}

Click here to go back.

Our aim is to provide information to the knowledge seekers.


comments powered by Disqus








Footer1