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 are operators and its types?
What is anagram of a string?
Is math class static in java?
How many digits can a float hold?
What is meant by memory leak?
What is the difference between Array and Hash Table?
What are the methods available in a class?
What is the use of a copy constructor?
What is string made of?
Write a factorial program using recursion in java?
What are the classes of java?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
define polymorphism in java
How is string immutable in java?
Is java written in c?