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 do you mean by jjs in java8?

1061


Does java have extension methods?

1047


Can you override private or static method in java?

1038


What does split function do in java?

1078


What will happen to the exception object after exception handling?

1042


What is the driver class?

1092


What is difference between hashset and hashmap?

1179


Explain the significance of listiterator.

1170


What is meant by method overriding?

1166


Is it possible to use string in the switch case?

1101


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

1081


Is age a discrete variable?

1035


What's the difference between comparison done by equals method and == operator?

1019


What is api in java?

1020


Explain the access modifiers for a class, method and variables?

1184