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

How to sort array in descending order in java?

917


What are the important features of Java 9 release?

992


What are internal variables?

988


Outline the major features of java.

1074


Should a main method be compulsorily declared in all java classes?

1055


What is main function purpose?

1029


What is meant by data hiding/encapsulation?

1101


Why is it called a string?

1001


Write a java program to check if a number is prime or not?

1033


how can you take care of mutual exclusion using java threads? : Java thread

1040


Explain about static nested classes in java?

1059


Why is stringbuffer thread safe?

1042


How we create object in copy constructor?

1111


What is a string what operation can be performed out with the help of a string?

1039


Which api is provided by java for operations on set of objects?

1451