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 kind of variables can a class consist?
What is a default constraint?
Write a method to check if input string is palindrome?
How to sort array in descending order in java?
explain different ways of using thread? : Java thread
what is enumset?
How many bits is a string?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
Can a class be defined inside an interface?
What is a constructor overloading in java?
Write a program to print all permutations of string?
What are design patterns and please explain?
What is a substitution variable?
What is a parameter in a function?
How to run a JAR file through command prompt?