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 are the problems faced by java programmers who don't use layout managers?

980


What is tcp and udp?

1018


How do you clear a method in java?

1012


What is the difference between logical data independence and physical data independence?

1040


'A class is a template for an object' explain this statement.

1056


What is sorting in java?

992


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?

994


What is equals method in java?

1041


What is singleton service?

978


How do you reverse sort a list in java?

942


Difference between java and javascript

1103


What does split function do in java?

1026


What two classes are used to read data only?

1101


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

1014


What are different ways of object creation in java ?

1078