What is the difference between abstract class & Interface?

What is the difference between abstract class & Interface?

Abstract class is a class that can not be instantiated and having zero or more abstract method.

It must be subclassed by other class implementing the abstract method. 

The abstract class is modified by keyword \'abstract\'. 

Interface can be think of as fully abstract class.All the method within the interface are abstract must end with a semicolon followed by parantheses.

If a class implement an Interface,it must provide the definition to all the methods of the interface or it must be the abstract class.


By:Jalees
Date:2011-01-09 00:00:00

Abstract class is a class that can not be instantiated and having zero or more abstract method.

It must be subclassed by other class implementing the abstract method. 

The abstract class is modified by keyword \'abstract\'. 

Interface can be think of as fully abstract class.All the method within the interface are abstract must end with a semicolon followed by parantheses.

If a class implement an Interface,it must provide the definition to all the methods of the interface or it must be the abstract class.


By:Rajesh Kumar
Date:2019-01-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher