What is the difference between Abstract Class and Interface
Answer Posted / ravi
1.A programmer creates abstract class when there are some
common features shared by all the objects.
A programmer writes an interface when all the features
should be implemented differently for different objects.
2.When an abstract class is written the programmer should
provide sub classes to it.
A programmer writes an interface when he wants to leave
implemntation classes to third party vendors.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Can we have any code between try and finally blocks?
What is the final keyword?
Can we declare the static variables and methods in an abstract class?
How many types of equations are there?
What is a parameter in a function?
How do you write a conditional statement?
How to change value in arraylist java?
What is the reflection?
Can we nested try statements in java?
When throws keyword is used?
How can we achieve thread safety in java?
How many decimal digits is 64 bit?
Can each java object keep track of all the threads that want to exclusively access it?
Is alive and join method in java?
What is mean by exception?