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
What is finalize()?
Is node a data type in java?
What are the concepts of 'OOPS'?
What is the difference between JVM and JRE?
What are methods of a class?
Are arrays static in java?
What is void data type?
Which one of the following suits the description of a string better: derived or primitive?
design an lru cache in java?
What is null mean in java?
How is hashset defined in java?
What does isempty () do in java?
Why is the main method declared static?
Can variables be used in java without initialization?
how is final different from finally and finalize in java?