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 path and classpath in java?
What is == and === in javascript?
If goto and const is reserve words than why it is not work in java?
What is a singleton class in Java?
Explain methods specific to list interface?
Is multiple inheritance supported by java?
How do I type unicode?
What is complexity and its types?
What is set and get methods in java?
Where is core java used?
Why there is no call by reference in java?
Explain the difference between a Thread and a Process.
Write a program to check for a prime number in java?
What is the multi-catch block in java?
How to reverse a string in java?