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 exactly is java?

709


Explain naming conventions for packages?

777


Can arraylist hold different types java?

709


Explain the scope of a variable.

845


What are the differences between processes and threads?

761


What is the difference between the paint() and repaint() methods in java programming?

892


What is use of inner class in java?

758


Can we have multiple classes in a single file?

731


How do you check whether the list is empty or not in java?

738


What is the use of accept () method in java?

824


What is data type in computer?

715


Why can't we use static class instead of singleton?

722


What is stringjoiner ?

748


Can private class be extended java?

766


What is the purpose of tostring() method in java?

793