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 strings in java?
What is static keyword in java?
Explain the features of interfaces in java?
Can You Have Virtual Functions In Java?
What are the different types of multitasking?
How do you use compareto?
What is difference between synchronize and concurrent collection in java?
Is string an object?
how we can create packages in java?
What are the advantages of unicode?
Can we create our own wrapper class in java?
Explain an algorithm to find depth of a binary tree.
Is array primitive data type in java?
How many times finalize method will be invoked? Who invokes finalize() method in java?
What are autoboxing and unboxing? When does it occur?