Code For NonGeek
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Difference between Interface and Abstract Class?

Go down

Difference between Interface and Abstract Class? Empty Difference between Interface and Abstract Class?

Post  Admin Sat Aug 27, 2011 12:19 pm

An interface declares a set of related methods, outside of any class

An abstract class is an incomplete class definition that declares but does not define all of its methods

An interface defines an API that is independent of any class hierarchy. Interfaces are the ultimate encapsulators, but they hide all the details of the classes that implement their methods from the user of the interface.

Unlike an interface, an abstract class is a proper class. Unlike a concrete class, some of its behaviors are deliberately left to be defined by its own subclasses. Abstract classes cannot be instantiated because of this - only instances of concrete subclasses can be created.

Admin
Admin

Posts : 131
Join date : 2011-08-16

https://codefornongeek.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum