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
Why there are some null interface in java? What does it mean?
Do I need java on my computer?
What is Enum in Java?
What is meant by design patterns?
Is Java a dying language?
What is the purpose of using break in each case of switch statement?
What is bufferedreader in java?
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?
What’s the difference between the methods sleep() and wait()?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What is the hashcode () and equals () used for?
Why doesn't the java library use a randomized version of quicksort?
What are the properties of thread?
Explain the difference between string, stringbuffer and stringbuilder in java?
What is the same as procedures?