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

what is overloading in java?

Answer Posted / sivaprasad addepalli

Method Overloading comes into picture when there are two
methods with same name but it must differ in one of the
follwing:

--> Number of arguments.
--> Datatype of arguments.
--> Order of the arguments.

for ex:

class sample
{
public:

void add (int a, int b)
{
}
void add (int a, int b, int c)
{
}
}

In this case the number of arguments are different so it is
method overloading.

Is This Answer Correct ?    20 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does I ++ mean?

1009


What is boolean logic?

975


How do you pass by reference?

994


Is cout buffered?

1119


What is a numeric string?

968


write a program that list all permutations of ABCDEF in which A appears before B?

2442


Is array a class in java?

934


Is 64bit faster than 32 bit?

1020


What is the use of isempty in java?

971


Can interface be private in java?

953


Can inner class be public in java?

983


Why put method is used?

970


What is a pointer and does java support pointers?

965


What technique is carried out to find out if a particular string is empty?

976


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

972