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

Explain the difference between abstract classes and interfaces in java?

866


Explain the difference between treeset and treemap in java?

778


What is tree node in java?

744


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

814


Can arraylist hold different types java?

729


What is a class in java?

808


Can we serialize singleton class?

795


What is thread safe singleton?

742


What is module in project?

752


What do you understand by garbage collection in Java? Can it be forced to run?

777


Can variables be used in java without initialization?

833


Tell me the latest versions in java related areas?

863


If a class is declared without any access modifiers, where can the class be accessed?

828


What are classloaders?

798


What are the four corner stones of oop?

806