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 are the basics of core java?
What is a constructor overloading in java?
What is the Difference between Final Class && Abstract Class?
Can a class have 2 constructors?
What is difference between float and double?
What is anti pattern in java?
How do you create a bulleted list?
What is nested top-level class?
What are the major advantages of internal iteration over external iteration?
Can a top level class be private or protected?
What is the use of static methods?
What is the java reflection api? Why it’s so important to have?
Does java set allow duplicates?
What is meant by null and void?
What do you mean by an interface in java?