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 the difference between a loader and a compiler?
What is the purpose of the system class in java programming?
What are the advantages of java?
What is the difference between public, private, protected, and friend access?
What's the difference between int and integer in java?
What is considered an anti pattern?
How to sort numbers in java without array?
Does string isempty check for null?
How infinite loop is declared?
What means public static?
What do you mean by jjs in java8?
What are different types of references?
What is the applet security manager, and what does it provide?
Realized?
Can we extend private class in java?