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 java in detail?
What is the program development process?
How can you read content from file in java?
What is immutable data?
What is finally block?
Can a serialized object be transferred via network?
Can you call a method in a method?
What are the wrapped, classes?
How can we create objects if we make the constructor private ?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
Explain reverse a linked list iterative solution in java?
What invokes a thread's run() method in java programming?
Explain the difference between map and flatmap stream operation?
What are the 6 mandatory procedures for iso 9001?
Explain the pointers in Java?