Friday, June 8, 2012

Differences between an abstract calss and interface.

An abstract class may contain abstract or non abstract methods.
Interface can contain only method signature.
An abstract class can inherit from a class and one or more interfaces.
An Interface can only inherit from another interface.
An abstract class can contain fields,constructors and destructors.
An Interface cannot contain fields,constructors and destructors.
An abstract class cannot inherit from structures.
An Interface can inherit from structures.
An abstract class does not support multiple inheritance.
An Interface can support multiple inheritance.

No comments:

Post a Comment