×

Discussion Board

Results 1 to 4 of 4

Thread: Difference

  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Post Difference

    Hi every one ,

    i have a question , what is the difference b/w the abstract class and a interface? i got few answers after googling it , but dint get the basic concept that differentiate b/w these two ?? does all the methods in interface are abstract methods by default???

    thanks

    manju.

  2. #2
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Re: Difference

    Yes.
    Interface contains methods that must be abstract.
    read here.
    http://www.discussweb.com/java-progr...interface.html
    Bharath... :)

  3. #3
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Re: Difference

    Thanks Bharath , for yo useful information..

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Difference

    An abstract class can contain method implementations (concrete methods), as well as abstract methods. It can also contain definitions of data, such as instance variables. A class my extend an abstract class (just as any other class), but only one. A class cannot inherit from multiple classes (abstract or otherwise).

    All the methods in an interface are public and abstract. A class can implement as many interfaces as you like, but nothing is inherited from an interface, because an interface contains only declarations, it does not define anything.

    Graham.

Similar Threads

  1. What's the difference ?
    By amit_yadav in forum Mobile Java General
    Replies: 3
    Last Post: 2009-05-07, 06:08
  2. what is the difference in them?
    By pakkami22 in forum Python
    Replies: 2
    Last Post: 2008-08-01, 15:28
  3. Difference
    By mayur2007 in forum Symbian
    Replies: 2
    Last Post: 2007-03-09, 06:18
  4. what's the difference
    By zanzon in forum Mobile Java General
    Replies: 8
    Last Post: 2006-05-24, 18:20
  5. What is the difference?
    By vinokiay in forum General Messaging
    Replies: 1
    Last Post: 2002-08-01, 06:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •