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...

The following program is Overloading or Overriding?
public class PolymorphismEx {
public int sampleMethod(int a) {
return a;
}

public String sampleMethod(int a) {
return "Is it Overloading or Overriding???";
}
}

Answer Posted / kvsravindrareddy

Its kind of overriding, but the program will give compilation
error. why because Overriding cannot be possible within the
same class. or Duplicate method cannot possible within the
same class.

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reverse sort in java?

896


What are the supported platforms by java programming language?

999


Why are there no global variables in java?

1001


What is a map in java?

931


What are the main differences between the java platform and other platforms?

991


How to Sort Strings which are given in List and display in ascending order without using java api.

4337


Why is java called java?

977


What is udp in java?

928


What does indexof return in java?

934


how to create constants in java?

1036


How many bytes are there?

946


What if I write static public void instead of public static void in java?

1019


What is static class

1049


What do the thread?class methods run() and start() do?

981


How do you remove duplicates from an array in java?

902