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 is the purpose class.forname method?

968


What is the replace tool?

1180


Differentiate between array list and vector in java.

1125


What is incompatible types in java?

1045


What are the wrapped, classes?

1063


What is a function in java?

1039


What is meant by class loader? How many types are there? When will we use them?

976


What is the difference between class & structure?

1238


What is the purpose of the enableevents() method in java programming?

1193


Can memory leak happen java?

1014


Why convert an applet to an application?

1107


What are byte codes?

1235


Explain different ways of creating a thread?

1069


How does multithreading take place on a computer with a single cpu in java programming?

1025


Where pragma is used?

1059