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


Please Help Members By Posting Answers For Below Questions

What are operators and its types?

567


What is anagram of a string?

515


Is math class static in java?

607


How many digits can a float hold?

535


What is meant by memory leak?

537






What is the difference between Array and Hash Table?

541


What are the methods available in a class?

584


What is the use of a copy constructor?

570


What is string made of?

525


Write a factorial program using recursion in java?

512


What are the classes of java?

537


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

613


define polymorphism in java

631


How is string immutable in java?

539


Is java written in c?

538