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
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
What is member in java?
What is sorting in java?
What are the rules for naming an array?
What is the difference between variable & constant?
What is difference between == and === in js?
Explain about strings in java?
What is the difference between the size and capacity of a vector?
In java, how we can disallow serialization of variables?
Is a char always 1 byte?
What are the string methods in java?
What is operator overloading. Is it is supported in java?
What is keyword auto for?
What is the transient keyword?
How many types of memory areas are allocated by jvm?