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
What is the equal sign?
Why method overriding is used?
Why java is call by value?
How do you test a method for an exception using junit?
How would you format a date in java? I.e. In the ddmmyyy format?
What is substring 1 in java?
What are the differences between getting and load method?
Describe how to implement singleton design pattern in struts.
What kind of variables a class can consist of?
What is the difference between numeric and integer?
can java object be locked down for exclusive use by a given thread? : Java thread
Why singleton class is used in java?
What is the difference between error and an exception?
What is == and === in javascript?
Does hashset allow duplicates in java?