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
Explain the difference between arraylist and linkedlist in java?
How many bits are in a sentence?
What is a 16 bit word?
Which language is java?
How much ram can a 64 bit processor theoretically?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
Why is the main method declared static?
What is unicode in java?
Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.
Difference between string, stringbuffer and stringbuilder?
Is java owned by oracle?
What is the use of set in java?
What is hash code collision?
What is string in java with example?
Can we have any code between try and finally blocks?