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 / irshad ahmad

Method overloading in java:
create more than one methods that have same name, but
different parameter lists and different definitions, within
a class.
It is used when objects are required to performed similar
tasks but with using different input parameter list.

class ABC
{
int x,y,z;
void star(int a,int b,int c)
{
x=a; y=b;z=c;
}
void star(int a,int b)
{
x=a; y= z=b;
}
void star(int a)
{
x= y= z= a;
}

int result()
{
return(x*y*z);
}
}

Is This Answer Correct ?    43 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List some important features of java 10 release?

1161


Does java set allow duplicates?

1135


Explain what access modifiers can be used for variables?

1108


Can we change the scope of the overridden method in the subclass?

1457


Is a boolean 1 bit?

1121


Explain yield() method in thread class ?

1116


Convert Binary tree to linked list.

1142


Why does my function print none?

1007


What methodology can be employed to locate substrings inside a string?

998


Does java support function overloading, pointers, structures, unions or linked lists?

1160


What are the 4 types of characters?

1056


How does predicate work in java?

1035


Difference between comparator and comparable in java?

1159


What are user defined exceptions?

1094


What is early binding and late binding in java?

1290