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

Explain throw keyword in java?

992


What are singleton services?

837


What is the difference between the font and fontmetrics classes in java programming?

1025


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

971


What is the maximum size of arraylist in java?

943


What is multithreading in java?

1003


What are the two main uses of volatile in Java?

1010


Are global variables initialized to zero?

910


Explain the use of sublass in a java program?

973


How do you use compareto in java?

923


Explain the difference between throw and throws in java?

946


Wha is the output from system.out.println(“hello”+null); ?

1085


How can you add and remove nodes in jtree?

972


What restrictions are placed on method overloading?

1118


define the terminology association.

1048