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 static variable with example?

766


What is an argument java?

718


What is a consumer in java?

776


What is the loop in java?

803


How do you override a variable in java?

730


Are primitives objects?

790


What does the string method compareto () do?

761


What is volatile keyword in java

877


Differentiate between run time error and syntax error.

814


What is an class?

767


What are the benefits of operations in java?

686


How does singleton class work?

739


we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.

1805


Mention a package that is used for linked list class in java.

740


Are floats faster than doubles?

778