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 do you take thread dump in java?
What is a Transient Object?
What is reverse function?
What are different types of expressions?
How do we access static members in java?
What is thread safe in java?
what is the swingutilities.invokelater(runnable) method for? : Java thread
what is mutual exclusion? : Java thread
What is a values collection view ?
State one difference between a template class and class template.
What is the main advantage of passing argument by reference?
What is the difference between heap memory and stack memory?
How do you calculate roots in java?
Explain the differences between static and dynamic variables?
why would you use a synchronized block vs. Synchronized method? : Java thread