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...

Difference between overloading and overridding?

Answer Posted / tulasi

Overloading is the concept where there are many methods
with the same name in a class but the arguments passed
differ.Consider the example of method called
addition.Addition can be between integers,floating point
numbers etc., so same name addition is used for the various
methods of class but the parameters passed differ, it may
be integer or floating point.When the jvm checks for the
methods, the method is choosen depending upon the argument
passed.

Overriding is the concept where the method name is
same,arguments passed are also same and the return type is
also same.but the method implemented depends upon where its
defined and called

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are encapsulation, inheritance and polymorphism?

1053


Which java ide is used the most?

1048


What is an iterator java?

1195


Can you sort a string in java?

968


Is it compulsory for a try block to be followed by a catch block in java for exception handling?

1053


Is vector thread safe in java?

1094


What is java util concurrentmodificationexception?

956


What is use of set in java?

1072


What is the purpose of final keyword and when to use it?

1055


Is a method a function?

1093


Can a final variable be initialized in constructor?

1014


How will you compute size of a structure?

1264


Can a class be protected in java?

1010


Which class is the superclass for all the classes?

1062


What is the difference between heap and stack memory?

1244