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


Please Help Members By Posting Answers For Below Questions

What are the basics of core java?

546


What is a constructor overloading in java?

519


What is the Difference between Final Class && Abstract Class?

613


Can a class have 2 constructors?

496


What is difference between float and double?

496






What is anti pattern in java?

514


How do you create a bulleted list?

561


What is nested top-level class?

576


What are the major advantages of internal iteration over external iteration?

570


Can a top level class be private or protected?

570


What is the use of static methods?

583


What is the java reflection api? Why it’s so important to have?

550


Does java set allow duplicates?

524


What is meant by null and void?

534


What do you mean by an interface in java?

569