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 is the difference between a loader and a compiler?

773


What is the purpose of the system class in java programming?

784


What are the advantages of java?

782


What is the difference between public, private, protected, and friend access?

812


What's the difference between int and integer in java?

878


What is considered an anti pattern?

734


How to sort numbers in java without array?

766


Does string isempty check for null?

798


How infinite loop is declared?

785


What means public static?

814


What do you mean by jjs in java8?

791


What are different types of references?

774


What is the applet security manager, and what does it provide?

792


Realized?

1953


Can we extend private class in java?

793