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
Can a class be private?
What is the difference between multitasking and multithreading in Java
What is sleep method?
When is an object subject to garbage collection?
Is string is a keyword in java?
what is meant by abstract class?
Which is better arraylist or vector?
How to handle a web browser resize operation?
Convert a BST into a DLL and DLL to BST in place.
What is temp in java?
What is navigable map in java?
Why is the type for real numbers called double?
Is call by reference possible in java?
is it possible to instantiate the math class?
Can we inherit a class with private constructor?