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 is difference between path and classpath in java?

706


What is == and === in javascript?

771


If goto and const is reserve words than why it is not work in java?

1758


What is a singleton class in Java?

744


Explain methods specific to list interface?

751


Is multiple inheritance supported by java?

705


How do I type unicode?

736


What is complexity and its types?

732


What is set and get methods in java?

748


Where is core java used?

776


Why there is no call by reference in java?

697


Explain the difference between a Thread and a Process.

780


Write a program to check for a prime number in java?

794


What is the multi-catch block in java?

782


How to reverse a string in java?

771