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
Is sizeof a keyword in java programming?
What is t in generics in java?
What do you mean by a JVM?
Explain differences between collection api and stream api?
Explain the difference between abstract classes and interfaces in java?
What is matcher in java?
how can i use a nonsynchronized hashtable?
What is the final method?
Why is the singleton pattern considered to be an anti pattern?
What are predefined functions?
What is exception propagation?
What is an off by one error in java?
What are alternatives to java serialization?
Does the order of public and static declaration matter in main method?
How is treeset implemented in java?