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

What is a singleton class? Give a practical example of its usage.

1049


Is sizeof a preprocessor?

951


What are the differences between forwarding () method and sendredirect() methods?

1067


What function extracts specified characters from a string?

965


What is the method overriding?

1052


What is use of valueof () in java?

1003


What is java util concurrentmodificationexception?

876


How many types of design patterns are there?

1055


Variable of the boolean type is automatically initialized as?

975


Are maps ordered java?

903


Explain the importance of import keyword in java?

962


What is a pointer and does java support pointers?

965


What are the three parts of a lambda expression?

955


What is backdrop?

1022


What are triggers in DB? Explain their types. How do they work?

1042