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 a dot notation?
Is a char always 1 byte?
Which category the java thread do fall in?
Why does java doesnt suuport unsigned values?
How many bytes is a string java?
Explain the private protected method modifier?
Explain with example the concept of constant variable in java.
What are 3 boolean operators?
Can you sort a string in java?
What happens if constructor is private?
What are the 4 types of research methods?
How to reverse a string in java?
How many digits is int32?
How can we create an immutable class in java?
Can you achieve runtime polymorphism by data members?