what is difference between abstraction and interface?
Answer Posted / kavitha
Abstract classes define methods and interfaces declare
methods.
Interfaces declare methods without implementation.
Abstract classes are very much useful when there is a same
functionality across various classes.
Interfaces are useful for classes which varies in
functionality and with the same method signature.
Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
What is the difference between class & structure?
When will we prefer to use set and list in java and why?
What is var keyword ?
What is thread safe singleton?
What is substring in java?
What are static blocks and static initalizers in java ?
Can you achieve runtime polymorphism by data members?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
How can we make copy of a java object?
What is multi-catch block in java?
What methods are used in Servlet?Applet communication?
Difference between stack and queue?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
How many types of methods are there in java?
Can static methods access instance variables in java?