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

What does 3 dots mean in java?

1002


How you can force the garbage collection?

996


What are dot operator queries?

1116


What is the final blank variable?

1147


What are the two ways in which thread can be created?

1061


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

1021


What is canonical name in java?

1166


How is treeset implemented in java?

1034


What is the difference between numeric and integer?

1016


What is array size in java?

973


Does hashset allow duplicates in java?

1131


Can we declare main () method as non static?

987


What is the diffrence between inner class and nested class?

1103


What’s the difference between callable and runnable?

1114


Explain the features of interfaces in java?

988