what is difference between method overloading & method
overridding with example?
Answer Posted / rana.ankur
overloading:
class A
{
Num(int a)
{
System.out.println("a: " + a);
}
Num(int a,int b)//overloading
{
System.out.println("a and b: " + a + " " + b);
}
CLass Overloading
{
public satic void main(Stinr ar[])
}
A a=new A()
a.Num(12);
a.Num(12,12);
}
}//thanks
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Where and how can you use a private constructor?
Is set sorted in java?
Can we override tostring method in java?
What 5 doubled?
What is a buffer in java?
What is a double?
What is the range of a character variable?
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
What are the important features of Java 10 release?
Explain about OOPS concepts and fundamentals.
Explain about the interpreter in java?
What do you understand by looping in java? Explain the different types of loops.
Explain the importance of finally over return statement?
What is the purpose of finalization in java programming?
What does java ide mean?