class SuperClass 
{
	void multnum (int x, int y) 
	{
		int mult;
		mult = x * y;
		System.out.println("The product is " +mult);
	}
	void disp() 
	{
		System.out.println("This is Superclass");
	}
}


class SubClass extends SuperClass 
{
	public static void main (String args[]) 
	{
		SubClass t1 = new SubClass();
		t1.disp();
		t1.multnum(4,5);
	}
}

Click here to go back.

Our aim is to provide information to the knowledge seekers.


comments powered by Disqus


Footer1