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
What is difference between word and integer?
What is class forname used for?
What is return type in java?
Explain java coding standards for interfaces?
How will you invoke any external process in java?
Can you explain the meaning of aggregation and composition
How many decimal digits is 64 bit?
Why is singleton class used?
What is core java called?
How do you compare characters in java?
What is a null point?
What is a dynamic array java?
How to stop a thread in java? Explain about sleep () method in a thread?
Is null a string in java?
What is a arraylist in java?