What are the performance implications of interfaces over abstract classes?



What are the performance implications of interfaces over abstract classes?..

Answer / 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

More Core Java Interview Questions

What is arraylist e in java?

0 Answers  


How do I get a substring?

0 Answers  


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

0 Answers   Genpact,


Can a lock be acquired on a class in java programming?

0 Answers  


What is the difference between a method and a procedure?

0 Answers  






What are null interfaces in JAVA ? and give me some examples?

5 Answers  


when we have to use final class in java?

2 Answers  


What will be the initial value of an object reference which is defined as an instance variable?

0 Answers  


What is variable explain?

0 Answers  


What is the method to expand and collapse nodes in a jtree?

0 Answers  


What methods are called, When we navigate from one applet to another applet?

1 Answers  


1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.

2 Answers   HCL,


Categories