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

Difference between a process and a program?

615


What is the list interface in java programming?

582


What is a file pointer?

516


Why we override equals() method?

566


Why does java not support pointers?

551






What are the two environment variables that must be set in order to run any java programs?

531


Can a class have more than one object?

528


What types of index data structures can you have in java?

614


What is the final blank variable?

589


How we can skip finally block of exception even if some exception occurs in the exception block in java?

524


Is java map thread safe?

493


List the interfaces which extends collection interface?

535


What is the purpose of the system class in java?

554


What is the difference between serial and throughput garbage collector?

582


What are the files generated after using IDL to java compiler?

589