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 set ordered in java?

576


Explain notify() method of object class ?

616


What is stringwriter?

543


Why is the main method static?

607


What is the maximum size of byte array in java?

542






What happens when main () method is declared as private?

653


What is the function of static in java?

545


What is the implementation of destroy method in java. Is it native or java code?

489


Can we use catch statement for checked exceptions?

522


Explain what is encapsulation?

611


What is the difference between stream and buffer?

521


What is implicit object in java?

554


What is java used for?

562


What is jit and its use?

589


what is ststic with example

1599