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
Difference between character constant and string constant in java ?
What is an exception in java?
Will set allow duplicates in java?
Why do we need strings in java?
Why java does not support pointers?
How many types of literals are there in JAVA?
What are the two main uses of volatile in Java?
What is variable declaration and definition?
Is it possible for a yielded thread to get chance for its execution again?
How do you convert int to char in java?
What is difference between string and stringbuffer?
List implementations of list interface?
Can we write multiple catch blocks under single try block?
How is hashset defined in java?
What is a get method?