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 what access modifiers can be used for methods?

1120


What are the advantages of functions?

955


What is the new line character?

1231


What is static class

1161


What are thread safe functions?

988


What do you understand by overloading and overriding in java?

1118


What is callable java?

1034


What are the differences between processes and threads?

1117


What are functions in java?

1003


Why strings in java are called as immutable?

1039


What are different data structures in java?

1086


What is the purpose of using javap?

1154


Why vector is used in java?

1069


What is t type java?

1105


Give example to differentiate between call by value and call by reference.

1108