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 |
How do I convert a string to an int in java?
What is the differnence between String Buffer and String builder despite having knowledge that String builder is faster than String Buffer and last one is threadsafe.please tell another important difference.
What happens if an exception is not handled in a program?
What is this keyword in java?
What is a platform?
What are field variable and local variable?
What's the purpose of using break in each case of switch statement?
Can a class be private in java?
Why java is said to be pass-by-value ?
What do you mean by an interface in java?
what is Dictionary? and what purpose it is used for?
Can I learn java in 3 months?