I have a class which is abstract which contains only the
abstract methods. This is similar to an interface. Then, if
i have given a choice to choose one of them. Which one i
have to choose and why?
Answer Posted / madhav
Interface is preferable to Abstract class as when ever in
instance is created for subclasses of this,constructors
will be called hirarchially consuming some time for each
constructor call..
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is module with example?
Is arraylist a class in java?
What is the size of int in 64-bit jvm?
What is locale?
How many types of methods are there in java?
Give an example of call be reference significance.
Explain the difference between abstract class and interface in java?
Can we create object of inner class in java?
What is the difference between synchronized and synchronized block?
Why can we not override static method?
Why is a string immutable?
Define interface in java?
What happens if an exception is throws from an object's destructor?
What is a method in coding?
What is final keyword in java?