what is difference between Interface and abstract class
Answer Posted / naveen
Interface is a specification it tells a class has what to do.
It is purely abstract class it contains abstract methods and final static variables.
Generally begining of the project PM or TL are providing the Interfaces, developers are implementing the Interfaces.
Abstract class
Abstract class is a mediator between Interface and Class , any common code is their that code written in Abstract class and then extend the Abstract class. Abstract class containing abstract and concreate methods.
Abstract class are used in Designing level.If take java predifined class we understand easily.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Where are the local variables stored?
What is the transient keyword?
What is use of functional interface in java 8? Explain
What is the covariant return type?
What is implicit object in java?
What is close method? How it's different from Finalize & Dispose?
What is the difference between the file and randomaccessfile classes?
What is <> used for in java?
Can we increase array size dynamically in java?
Can a class be defined inside an interface?
When is the finalize() called? What is the purpose of finalization?
How will you reverse a singly-link list?
Why string is not thread safe?
what is a thread pool in java and why is it used?
Can a class be protected in java?