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 |
What is the difference between class and interface?
How do I make sure that an object is released in code such as a connection or file object?
Can you tell something about GDI objects?
How to make a class accessible as a web service?
What are the basic concepts of oop?
Write a note about inheritance?
Explain colloboration
What are the Differentiate between abstraction and encapsulation.
What is static polymorphism?
Explain persistence?
What is constructor and virtual function? Can we call virtual funciton in a constructor?
Can a class implement two interfaces having default method with same name and signature?