Which one is faster interms of accessing, interface or abstract class?

Showing Answers 1 - 14 of 14 Answers

Divash

  • Aug 27th, 2006
 

Abstarct class is faster to load, since case for interface JRE expect the methods defined inside to override with the class which implement the interface and that class has to implement all the method defined

  Was this answer useful?  Yes

khan_abk

  • Aug 27th, 2006
 

Using the interface is simple rather than creating an abstract classes since in the interface user only extends the super class.

  Was this answer useful?  Yes

pardeep dureja

  • Sep 4th, 2006
 

HiWhy to compare accessing speed? purpose of interface and abstract class is diferent where interface leaves all the method empty where as abstract classes atleast one method must be incomplete. Well it is functionality not accessing speed to use them.OOPS ! concept

  Was this answer useful?  Yes

vasu

  • Sep 9th, 2006
 

interface is faster than abstract class.Since interface has no method body it is lite weight component.where as in case of abstract class at least one method has method body. defenetly there is a difference.So interface is faster than abstract class.

veera

  • Dec 20th, 2006
 

Interfaces are only faster in accessing because they dont contain any undefined methods whereas abstract classes contain atleast one undefined method.

  Was this answer useful?  Yes

Sri Prakash

  • Aug 28th, 2007
 

Interface is slow because it requires extra indirection to find the corresponding method in the actual class. Modern JVMs are discovering ways to reduce this speed penalty.

Abstract Class is relative faster

narendra

  • Jul 28th, 2011
 

No, Suppose both have abstract method then ?

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions