abstract class

Discussion in 'Java' started by ashutosh.singh.kumar@gmail.com, Apr 16, 2008.

  1. Guest

    Why can't we use abstract class in place of Interface?
    , Apr 16, 2008
    #1
    1. Advertising

  2. Janusch Guest

    On 16 Apr., 14:00, wrote:
    > Why can't we use abstract class in place of Interface?


    Abstract class is a class.

    Class has only ONE superclass.

    Class can implement many interfaces.

    Is this you problem?

    Example:
    class A extends B implements C,D,E,F,(...),Z{ }
    A:class
    B:superclass
    C - Z: interfaces

    Janush
    http://kathorncity.no-ip.info/en/
    Janusch, Apr 16, 2008
    #2
    1. Advertising

  3. Because you can only extends 1 class. You use a abstract class when
    you fell that it would not make sense for an instance of that class to
    be created, but you want to add more than what you can provide with an
    interface.
    Chase Preuninger, Apr 16, 2008
    #3
  4. Roedy Green Guest

    Roedy Green, Apr 24, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthias Kaeppler
    Replies:
    1
    Views:
    420
    R.F. Pels
    May 22, 2005
  2. Sameer
    Replies:
    4
    Views:
    573
    Roedy Green
    Aug 31, 2005
  3. Uzytkownik
    Replies:
    3
    Views:
    578
    Uzytkownik
    Apr 3, 2005
  4. Iyer, Prasad C

    Abstract Methods & Abstract Class

    Iyer, Prasad C, Oct 20, 2005, in forum: Python
    Replies:
    0
    Views:
    527
    Iyer, Prasad C
    Oct 20, 2005
  5. Replies:
    4
    Views:
    801
    Rolf Magnus
    May 17, 2006
Loading...

Share This Page