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 / raji

class A and class B have same function name but different
arguments.overriding is possible only when both class A and
class B have same function name and same arguments.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is assembly language a low level language?

491


Explain super keyword in java.

580


How much is a java license?

521


What is a boolean expression in java?

530


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

567






What is static block?

586


How do you find the absolute value?

559


Difference between ‘is-a’ and ‘has-a’ relationship in java?

535


What is the purpose of return statement?

627


can rmi and corba based applications interact ?

664


What data type is string java?

535


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1358


What is scope & storage allocation of static, local and register variables? Explain with an example.

562


How to convert string to char and vice versa?

513


Explain the protected field modifier?

591