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

What is difference between final and immutable?

781


What is the difference between serial and throughput garbage collector?

784


Can we extend immutable class?

758


What language is an assembler written in?

755


Is there any limitation of using inheritance?

803


How many types of voids are there?

749


What is integer parseint?

723


How concurrent hashmap works?

864


How do you create a reference in java?

707


how would you implement a thread pool? : Java thread

685


What is the default value of byte datatype in java?

685


What is volatile keyword in java

877


Explain about procedural programming language or structured programming language and its features?

778


Explain wait() method of object class ?

869


What is off heap memory?

742