Can you explain the difference b/n abtract and interface
with a good example,?In what cases we have use abtract and
what case interface?
Answer Posted / nt.jayan
Interface contains final variable and method signatures
only. All of this method and variable are should be public.
In Technically interface like Pure Abstract class.
Abstract class contains both abstract method also may having
some method defination. When we want to use some of the
functionality in abstract we use Abstract class.
Also, By using Interface we achieve multiple inheritence
using Implements. When we use Abstract class we can extends
only.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can we define private and protected modifiers for the members in interfaces?
What is difference between public static and void?
What do you mean by platform independence of Java?
Is boolean a data type in java?
What are the characteristics of java?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
Define jit compiler?
Why java is used everywhere?
What does it mean to be immutable?
Why we use protected in java?
What is passing by reference in java?
What is a method in programming?
How do you make an arraylist empty in java?
What defines function?
What is the difference between comparison done by equals method and == operator?