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

It is neither overriding nor overloading.
because class A and B are two different and independent
classes. So "disp" function for both are completely bound by
the scope of their respective classes or more to say to the
objects of respective classes. Therefor,
if aa and bb are two objects of class A and B respectively
then
aa.disp() and bb.disp()will be two distinct function of two
different objcts of different classes only.

Is This Answer Correct ?    30 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you use abstract and final both with a method?

1008


Difference between string, stringbuffer and stringbuilder?

984


What are jee technologies?

959


How hashset works internally in java?

1012


Can we call the run() method instead of start()?

982


Explain inner classes ?

1069


Is binary a low level language?

866


Does constructor return any value?

969


What is the main difference between java platform and other platforms?

990


What is a method vs function?

978


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

1024


How many ways can we create singleton class?

914


What is finally block?

974


Give me some null interfaces in java?

1003


Can we have multiple classes in a single file?

912