what is main difference b/w abstract class and interface
Answer Posted / naga~1417
A class implementing an interface must implement all of the
methods defined in the interface, while a class extending
an abstract class need not implement any of the methods
defined in the abstract class. Additionally, a class
extending an abstract class can implement an infinite
number of it's own methods.
Abstract class does not support Multiple Inheritance .
Interface supports Multiple Inheriatnce..
The differnce is that in interface all are public but in
abstract class u can have private and protected members
Abstract class contains the method defination of the some
methods. but Interface contains only method declaration, no
defination
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What's the access scope of protected access specifier?
What is method overloading with type promotion?
Can you access non static variable in static context?
Can we have multiple classes in single file ?
What is the function of character?
How do you write a conditional statement?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
What is the difference amongst jvm spec, jvm implementation, jvm runtime ?
What is the difference between this() and super() in java?
Convert Binary tree to linked list.
Can a singleton class be inherited?
How does regex work?
What is the purpose of the file class in java programming?
How to perform quicksort in java?
Does treeset allow null in java?