Results 1 to 7 of 7
  1. #1
    Santoshbk is offline Member
    Join Date
    Apr 2008
    Posts
    5
    Rep Power
    0

    Default Difference between Abstract class having only abstract method and a Interface class

    Hello To All,

    I would like to know what is the difference between a Abstract class having only abstract methods and a Interface class with abstract methods.


    Thanks in Advance

    Regards,
    Santosh

  2. #2
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Question

    interface class???
    Rakesh Mehta

  3. #3
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Default

    i think there is no intercace classs....:confused:
    Rakesh Mehta

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    In end effect nothing, except that extending the abstract class will prevent the extension of any other class, whereas you can implement as many interfaces as you like (as long as they have no conflicting method declarations).

    There is also the fact that, in the abstract version, the method can be declared protected or "default", and in the interface the method is automatically public.

    P.S. To appease the previous poster, it is simply "interface" not "interface class".

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Yes, your question is not clear. There is no such things as Interface class. Are you referring interfaces?

  6. #6
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Smile

    but members inside iterface must be public and variable are also static and final....:)
    Rakesh Mehta

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. difference between Abstract and interface
    By mrark in forum New To Java
    Replies: 3
    Last Post: 11-07-2009, 04:20 AM
  2. Replies: 2
    Last Post: 11-21-2008, 12:20 AM
  3. Interface and Abstract Class
    By kian_hong2000 in forum New To Java
    Replies: 1
    Last Post: 08-27-2008, 02:22 PM
  4. Interface Vs Abstract Class
    By javarishi in forum New To Java
    Replies: 5
    Last Post: 06-15-2008, 05:43 AM
  5. Replies: 0
    Last Post: 04-02-2008, 07:04 AM

Posting Permissions

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