class A
{
public void disp(int a,int b)
{
System.out.println("hai");
}
}
class B
{
public void disp(int a,int b,int c)
{
System.out.println("hai");
}
}
above program is overloading or overriding?
Answer Posted / shereef.k
It is neither Overloading nor Overriding , because these two methods are defined in two different class, and it can make overlaoding when class B extends Class A. It can never make Overriding because the parameter list in two methods are different.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Differentiate between stringbuffer and string?
What is nextline method in java?
What is finally in Java?
Differentiate between == and equals().
Can you explain inner class.
What is factor r?
What is hotjava?
Difference between ‘>>’ and ‘>>>’ operators in java?
Can an integer be null java?
How to avoid memory leak in java?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
Why do we use regex?
How do you do absolute value in java?
How do you escape json?
Explain the difference between string, stringbuffer and stringbuilder in java?