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

what happens when a thread cannot acquire a lock on an object? : Java thread

1038


Can we overload final method in java?

962


What is anti pattern in cyber security?

1001


Why declare Main() method as a static in java ?

1053


What is set string?

1151


Write code of any action class?

986


What will happen if static modifier is removed from the signature of the main method?

944


Does a class inherit the constructors of its superclass in java programming?

1082


What is the locale class in java programming?

1062


What is java ceil?

1011


What is a functional interface?

1001


What about features of local inner class?

1047


What is the program compilation process?

1089


Which sorting is best in java?

983


How do you use find and replace?

933