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

What is class level lock ?

1034


How to print nodes of a Binary tree?

2250


Implement a stack with push (), pop() and min() in O(1) time.

1112


5 Coding best practices you learned in java?

1015


how come we know the object is no more used in the class?

6464


Is java util list serializable?

932


Can a constructor be made final?

1112


What two classes are used to read data only?

1099


Is int a class in java?

985


What is string args [] in java?

1031


What is a static class in java?

1010


What are the 2 types of java programs?

1113


What are the different tags provided in jstl?

954


what is abstract class in Java?

1116


What is the reflection?

1008