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 kind of variables can a class consist?

1053


What is a default constraint?

1065


Write a method to check if input string is palindrome?

1018


How to sort array in descending order in java?

916


explain different ways of using thread? : Java thread

1004


what is enumset?

1107


How many bits is a string?

987


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

1069


Can a class be defined inside an interface?

1026


What is a constructor overloading in java?

1028


Write a program to print all permutations of string?

1105


What are design patterns and please explain?

1078


What is a substitution variable?

1023


What is a parameter in a function?

985


How to run a JAR file through command prompt?

1268