what are the diffrences between interface and abstract
class?

Answer Posted / cool

=>Interface :
1. All the methods in the interface are abstract.
2. We can achieve multiple inheritance through interface.
3. All the methods in the interface should be without
Access modifier. Implicitly public.
Abstract class:
1. Abstract class may contain abstract method and non-
abstract method.
2. We can achieve only single inheritance and multi-level
inheritance.
3. Abstract methods have Access modifiers.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a double?

591


What is boolean example?

527


How is string immutable in java?

543


What is package private scope in java?

535


Is string pool garbage collected?

549






What are predicates in java 8?

533


What is the buffer limit?

560


What is lossy conversion in java?

563


What is a treeset in java?

547


Explain about interthread communication and how it takes place in java?

546


How to display arraylist values in java?

490


What is int lol?

596


What is constructor chaining and how is it achieved in java?

570


How do you sort objects in java?

517


What are voids?

533