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
Why do we need variables?
Is null or empty java?
Why string is immutable or final in java
What is the purpose of abstract class?
What is variable in java?
What is finalize()? Is finalize() similar to a destructor?
What is java object name?
What is tree in java?
what is meant wrapper classes?
What are the important features of Java 11 release?
How does hashset work in java?
What is the purpose of a transient variable?
What is difference between ++ I and I ++ in java?
how to write a program for sending mails between client and server
What exactly is methodology?