What is the difference between abstract class and interface?

Showing Answers 1 - 8 of 8 Answers

manish

  • Nov 1st, 2006
 

1 . abstract class have a concreate Method while interface have no method implementetion2. abstract class comes in to inherit chain while interface dont

  Was this answer useful?  Yes

bhabani

  • Nov 2nd, 2006
 

Abstract class may have concrete methods which need not require to be overridden but In Interface all methods need to be overridden .

Abstrct classes are Extended but interfaces are implemented .

in an interface all the methods are by default Abstract.

  Was this answer useful?  Yes

niranajn

  • Nov 8th, 2006
 

In Abstract class we can have non-abstract methods.Atleast one method should be abstract,others may be abstract or concrete.

Where as i Interface we dont have non-abstract methods.

In abstract classes we use the keyword abstract for the methods where as in interfaces we dont use any such keyword.

Using interfaces the concept of multiple inheritance is acheived but this can not be done with abstract classes.

  Was this answer useful?  Yes

Radhakrishna

  • Nov 8th, 2006
 

hi,

   Diff b/w abstract class and interface are..

 Abstract class can have concrete methods also..eventhough if the class doesn't contain any abstract method we can declare that class as an Abstract class.

   In case of Interface by default methods are abstract and public only. In the interface also there is a possibility of defining concrete methods using  the InnerClasses concept..

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions