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 best practices should you follow while writing multithreaded code in java?

1073


What are three ways in which a thread can enter the waiting state in java programming?

1165


How many types of interfaces are there?

1075


What is map and hashmap in java?

1064


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

1014


Explain method local inner classes ?

1037


Does constructor be static?

1039


Is arraylist a class in java?

1069


What is a null class?

982


What is a nested structure?

1042


What is meant by method overriding?

1113


What is a newline character in java?

1040


What are white spaces in java?

1048


Define array. Tell me about 2-D array.

1051


What is Java Shutdown Hook?

1201