What is the difference between an Abstract class and Interface?



What is the difference between an Abstract class and Interface?..

Answer / Vandana Barya

An Abstract Class is a class that contains both abstract methods (methods without implementation) and concrete methods (methods with implementation). It can be instantiated but cannot be used until all its abstract methods are implemented by subclasses. An Interface, on the other hand, only defines methods (both abstract and public) without any implementation. A class implements an interface to adhere to a contract of methods it must provide.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

What is the difference between class and interface?

1 Answers  


How do I make sure that an object is released in code such as a connection or file object?

1 Answers   MindCracker,


Can you tell something about GDI objects?

1 Answers   C DAC, CDAC,


How to make a class accessible as a web service?

1 Answers   BirlaSoft,


What are the basic concepts of oop?

1 Answers  


Write a note about inheritance?

1 Answers  


Explain colloboration

1 Answers  


What are the Differentiate between abstraction and encapsulation.

1 Answers  


What is static polymorphism?

1 Answers  


Explain persistence?

1 Answers  


What is constructor and virtual function? Can we call virtual funciton in a constructor?

1 Answers  


Can a class implement two interfaces having default method with same name and signature?

1 Answers  


Categories