Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can a class have more than one object?

935


What class of exceptions are generated by the java run-time system?

1118


What is the purpose of lambda expressions?

996


Can we execute a program without main?

960


How to do encapsulation in java?

996


What is the instance of an object?

1109


What is the purpose of static keyword in java?

902


What are structs in java?

995


List the different types of classloaders in java.

921


What is the finalize method do?

1043


v-model life cycle

1994


Why is the main method declared static?

1071


What is nextint java?

973


Why are the methods of the math class static?

1022


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

935