Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why interfaces are faster than abstract classes?

Answer Posted / aruna raman

Actually abstract are faster than interfaces classes.

interfaces are Slow, requires extra indirection to find the
corresponding method in the actual class. Modern JVM's are
discovering ways to reduce this speed penalty.

Abstract Class ::
- It cannot defines all the methods
- It has subclass.
- Here, Subclass is useless
- A class can be extend an abstract class

Interface ::
- It defines all the methods
- It must have implementations by other classes, But there
will be no use of that.
- Only an interface can extend another interface.

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell some latest versions in JAVA related areas?

968


Can java list be null?

979


How do you create a null object?

1070


Is main a keyword in java?

943


What is the difference in between cpp and java? Can u explain in detail?

1069


Is null a keyword in java?

954


Do we need to manually write Copy Constructor?

1018


What is the use of coding?

954


What do you understand by access specifiers in Java?

1000


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

1001


Can we force garbage collector to run ?

1042


What is the maximum size of a string in java?

1071


What is the difference between throw and throws keywords?

1035


What is the purpose of assert keyword used in jdk1.4.x?

1047


What is literal example?

935