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
Can an object subclass another object?
What is java literals?
How does compareto work in java?
How do you compare values in java?
What is the difference between static and global variables and also define what are volatile variables?
Does treeset allow null in java?
what is thread in Java ?
What does += mean coding?
What is operator overloading. Is it is supported in java?
How can we access some class in another class in java?
Is java good for beginners?
What is thread life cycle in java?
How would you dynamically allocate memory to an array?
Write a program to print fibonacci series up to count 10.
How many bits is a double?