Forums Java Help What is the difference between an Interface and an Abstract class

This topic contains 1 reply, has 1 voice, and was last updated by  Aakanksha 8 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3964

    Aakanksha
    Participant

    What is the difference between an Interface and an Abstract class?

    #11583

    Aakanksha
    Participant

    An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract.

    An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.