About Me

My photo
Raipur, Chhattisgarh, India
Hi , I am Amit Thakur. I have worked as a QA Engineer for two years and as a Java Developer for one year in NIHILENT TECHNOLOGIES PVT. LTD., Pune.Currently I am working as DEAN (Research & Development) in Bhilai Institute of Technology, Raipur.

Tuesday, July 26, 2011

**Demo of Abstract Class and Methods**


//Demo of Abstract Class and Methods


abstract class A
{
abstract void show();
void display()
{
System.out.println("This is display() method of Abstract class A...");
}
}


class B extends A
{
void show()
{
System.out.println("This is Overridden Method show() of class A in class B...");
}

}


class AbstractDemo
{
public static void main(String aa[])
{
B b=new B();
b.show();
       b.display();
}
}


Output




No comments: