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
Should database connections be singleton?
State the difference between creating string as new () and literal.
What is incompatible types in java?
Can we compare two strings in java?
What is java used for?
What is a generic data type?
What is set string?
Why arraylist is not synchronized in java example?
Is this valid in java ? Can we instantiate interface in java?
What is deserialization?
Is java still necessary?
Explain when classnotfoundexception will be raised ?
How do you write a scanner class in java?
Can private class be extended java?
What are the rules for naming an array?