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
Is alive method in java?
What is generics in java interview questions?
Why webdriver is an interface?
What are keywords give examples?
What is function overriding and overloading in java?
What is a modifier?
Can I import same package/class twice?
What is the benefit of singleton pattern?
Can java hashmap have duplicate keys?
What does singleton mean in java?
How java is similar to c?
What is the use of toarray () in java?
What is the size of arraylist in java?
What is a java object and java application?
What is getkey () in java?