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
How do you reverse a string in java without using string buffer?
Why put method is idempotent?
Explain exception chaining in java?
Is set ordered in java?
How to compare two strings in java program?
Explain the features of interfaces in java?
What do you understand by the term polymorphism?
Can memory leak in java?
What is an immutable class? How to create an immutable class?
What is fail fast in java?
In which order the iterator iterates over collection?
Which language is java?
How to make a read-only class in java?
Java Compiler is stored in JDK, JRE or JVM?
Difference between throw and throws?