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

Differentiate between stringbuffer and string?

988


What is nextline method in java?

973


What is finally in Java?

1010


Differentiate between == and equals().

992


Can you explain inner class.

1017


What is factor r?

913


What is hotjava?

950


Difference between ‘>>’ and ‘>>>’ operators in java?

1072


Can an integer be null java?

931


How to avoid memory leak in java?

1075


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

952


Why do we use regex?

950


How do you do absolute value in java?

922


How do you escape json?

937


Explain the difference between string, stringbuffer and stringbuilder in java?

951