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

Can a class be private?

920


What is the difference between multitasking and multithreading in Java

1140


What is sleep method?

1057


When is an object subject to garbage collection?

1003


Is string is a keyword in java?

940


what is meant by abstract class?

1073


Which is better arraylist or vector?

979


How to handle a web browser resize operation?

1013


Convert a BST into a DLL and DLL to BST in place.

1073


What is temp in java?

951


What is navigable map in java?

943


Why is the type for real numbers called double?

917


Is call by reference possible in java?

916


is it possible to instantiate the math class?

975


Can we inherit a class with private constructor?

1069