0

Possible Duplicate:
Interface vs Abstract Class (general OO)

I want to know the difference between an Interface and an Abstract class ?

I'm so confused about this.

Thanks already.

Community
  • 1
  • 1
Heavy-BadBoy
  • 37
  • 1
  • 4
  • Countless duplicates, including http://stackoverflow.com/questions/761194/interface-vs-abstract-class-general-oo and http://stackoverflow.com/questions/4126938/what-is-the-difference-between-an-interface-and-an-abstract-class – skaffman Jul 21 '11 at 20:51

2 Answers2

0

In an interface you simply define the methods that you are going to implement. In an abstract class you can actually write methods that contain some code. I'm sure this question has been asked a thousand times so look at some of the other posts.

0

Interfaces define contracts. Abstract classes provide for code reuse. An object interacts with other objects via their contracts (Interfaces). An object shares code with other, related, objects, by inheriting it from an abstract class.

Ryan Stewart
  • 126,015
  • 21
  • 180
  • 199