abstract & interface class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepbr2003
    New Member
    • Jun 2007
    • 2

    abstract & interface class

    what is the real time difference between abstract class & interface
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by pradeepbr2003
    what is the real time difference between abstract class & interface
    Implementing an interface is like signing a contract. The contact says I hereby swear that I will implement all the methods declared in the interface otherwise I'm going to be abstract.

    Extending a subclass says I want all the available functionality from that class copied over to me as well.

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      Abstract class is not a concrete class.
      That means it may contain abstract class or not.
      And abstract class may have concrete method or not.
      But interface can not contain concrete method .
      and Interfaces r by default abstract.
      For more clear conception read out the SUN-API.

      kind regards.
      dmjpro.

      Comment

      Working...