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 is mean by exception?

1032


Explain about complier design(phases)

1084


What is a method in programming?

1188


Which is better arraylist or vector?

1021


What is arguments in java?

1004


What are functions in java?

950


What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?

1111


What is a final class ?

1183


what is the purpose of "virtual"?

1086


What is meant by overloading?

1070


What is the size of integer?

1094


What is array pointers ?

1034


What is a string what operation can be performed out with the help of a string?

1052


What are the types of collections in java?

1057


What is the flag in java?

1063