Difference between interface and abstract class with ex.
Answer Posted / sreenivas g
Abstract Class : If a class contains atleast one
non-concrete(not implemented) method, it is said to be
Abstract class. it should be defined with keyword abstract.
It is a combination of both implemented and non-implemented
methods.
Interface : By default all the methods in Interface are
abstract methods. All the methods are non-implemented in
interface.
| Is This Answer Correct ? | 18 Yes | 2 No |
Post New Answer View All Answers
Write a java program to print fibonacci series?
How to sort array in descending order in java?
What are the different types of sorting in java?
Can variables be used in java without initialization?
What are basic keywords?
What is namespace in java?
Explain an algorithm to find depth of a binary tree.
Why we do exception handling in java and how many types of exceptions are there?
make a method which any number and any type of argument and print sum of that arguments.....
Why we cannot override static method?
When should the method invokelater() be used?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
v-model life cycle
What is a static method in java?
What is file in java?