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
Can we have two main methods in a java class?
What is meant by tab pans?
Can a private method be declared as static?
How many ways can we create the string object?
Explain about map interface in java?
What is the difference between java applets and applications?
How do you create a reference in java?
What is the core java?
what is anonymous class in java?
State the significance of public, private, protected class?
What is difference between identifier and variable?
Explain java coding standards for variables ?
Why runnable interface is used in java?
What are parsers? Dom vs sax parser.
How can we achieve thread safety in java?