What are the performance implications of interfaces over abstract classes?
Answer Posted / shakir
Interfaces are slower in performance as compared to abstract classes as extra indirections are required for interfaces. Another key factor for developers to take into consideration is that any class can extend only one abstract class while a class can implement many interfaces.
Use of interfaces also puts an extra burden on the developers as any time an interface is implemented in a class; developer is forced to implement each and every method of interface.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which keyword specify that a variable is effectively final ?
Is there any sort function in java?
If we don’t want some of the fields not to serialize how to do that?
How static variable work in java?
Is null or empty java?
Explain different states of a thread in java?
Explain the significance of listiterator.
Mention a package that is used for linked list class in java.
How do you define a singleton class?
Explain covariant method overriding in java.
Write a program to show whether a graph is a tree or not using adjacency matrix.
What is the use of isempty in java?
Which sorting is best in java?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
How do you make an arraylist empty in java?