Difference between abstract class and Interfaces?

Answer Posted / ranganathkini

An Interfaces defines a public contract of methods for the
classes that implement it. An implementing class must
implement all the method defined by the interface.

An abstract class on the other hand not only defines a
public contract of methods but may also provide partial
implementation of some or all of the class methods. A
subclass of an abstract class inherits the partial
implementation (if any) or must provide a concrete
implementation of the abstract methods.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lexicographically smallest string?

596


What is the role of garbage collector in java?

487


what are the high-level thread states? : Java thread

556


which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

9193


What does void * mean?

529






What is a class variable?

566


What are multiple inheritances? Is it supported by java?

458


What do you mean by scope of variable?

479


What is final variable?

494


placement papaers of spring computing technology

1020


What is the size of a string in java?

543


Are generics important java?

521


What are user defined exceptions?

585


What is string data?

550


Can we declare main () method as non static?

518