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
What is class level lock ?
How to print nodes of a Binary tree?
Implement a stack with push (), pop() and min() in O(1) time.
5 Coding best practices you learned in java?
how come we know the object is no more used in the class?
Is java util list serializable?
Can a constructor be made final?
What two classes are used to read data only?
Is int a class in java?
What is string args [] in java?
What is a static class in java?
What are the 2 types of java programs?
What are the different tags provided in jstl?
what is abstract class in Java?
What is the reflection?