What is method Overloading in the perspective of OOPS?
Answer Posted / kabita
In same class more than two methods having same name but
different signatures are called method
overloading .signatures are
no of parameters,datatypes of parameters,sequence of
parameters.returntype may same or not.
ex:public int add(int a,int b)
{
S.o.p(a+b);
}
public int add(int a,int b,intc)
{
S.o.p(a+b+c);
}
public double add(double d,double e)
{
S.o.p(d+e);
}
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is difference between length and length() method in java ?
What is the list interface?
Why is a constant variable important?
What is passed by reference and pass by value ?
How to obtain a performance profile of java program
How do you check if a string is lexicographically in java?
Implementations of set interface?
Differece between class and generic class?
Where is singleton pattern used?
How do you write a scanner class in java?
Can we create an object of private class?
How will you call an Applet using Java Script Function?
What is final variable?
What is advantage of java?
What is a lambda expression ? What's its use ?