Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2013
    Posts
    55
    Rep Power
    0

    Default Abstract class and interface

    If an abstract class can have concrete as well as abstract methods then what is the need for interface?

    Don't blast at me for this question. I was asked this, in an interview.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Abstract class and interface

    And what was your answer?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,354
    Rep Power
    6

    Default Re: Abstract class and interface

    New user account, same mistakes.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    0

    Default Re: Abstract class and interface

    we cannot extends more than one class(multiple inheritance) but we can implement more then one interface this is the main use of interface over abstract classes.

Similar Threads

  1. When to use Abstract class and Interface?
    By vivekjan17 in forum New To Java
    Replies: 1
    Last Post: 03-05-2012, 11:37 AM
  2. Abstract Class & interface
    By suresh.sa in forum New To Java
    Replies: 1
    Last Post: 10-18-2010, 09:25 AM
  3. Replies: 6
    Last Post: 02-11-2009, 11:51 AM
  4. Interface and Abstract Class
    By kian_hong2000 in forum New To Java
    Replies: 1
    Last Post: 08-27-2008, 03:22 PM
  5. Interface Vs Abstract Class
    By javarishi in forum New To Java
    Replies: 5
    Last Post: 06-15-2008, 06:43 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
  •