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
How to make object serializable in java?
What are the different tags provided in jstl?
How do you override a method?
Can we assign null to double in java?
What is a Presistent Object?
What is join () in java?
What are identifiers in java?
What is a map in java?
What does serializing data mean?
Is list thread safe in java?
What are the features of junit?
Is it possible for a yielded thread to get chance for its execution again?
Java is pass by value or pass by reference? Explain
What is the best definition for data?
What are the states of thread in java?