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
Explain inheritance in java?
Which programming language is best in future?
Is ++ operator thread-safe in java?
When we serialize an object does the serialization mechanism saves its references too?
What do you understand by the term string pool?
Can we serialize static variables in java?
Explain the importance of throwable class and its methods?
What is bigger kb or mb?
How can you handle java exceptions?
Can a class have multiple superclasses?
What does index mean in java?
What are different ways of object creation in java ?
How do you use equal in java?
How many bytes is a unicode character?
What ide should I use for java?