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
Explain 5 io best practices?
What are the limitations of procedural programming approach?
Does constructor be static?
What are the types of methods in java?
How to change value in arraylist java?
Does list allow duplicates in java?
When super keyword is used?
I want to persist data of objects for later use. What’s the best approach to do so?
Explain about static imports in java?
Can an arraylist be empty?
why java does not support unsigned keyword?
Can we overload run() method in java?
What is stack class in java?
Differentiate between stringbuffer and string?
What does s mean in regex?