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

There are 2 methods in a class. Both have the same method
signature except for return types. Is this overloading or
overriding or what is it?

Answer Posted / shamsherabanu

It is not overloading because overloading must have different parameters, no matter what ever may be the return type is.
And for overriding inheritance should be used between 2 classes.
so it is neither overriding nor overloading.

It just show compilation error as method is already defined in
same class

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many decimal places is a double?

925


What class allows you to read objects directly from a stream in java programming?

992


describe method overloading

956


What does exp mean in math?

937


What are java methods?

1037


What is a layout manager and what are different types of layout managers available in java awt?

1199


Program to Find the second largest element in an array.

1109


What is data string?

882


What is the range of the short type?

949


What is the difference between the paint() and repaint() methods?

1009


What is difference between path and classpath in java?

950


How can we find the actual size of an object on the heap?

1262


What are the changes in java.io in java 8 ?

966


How garbage collection is done in java?

987


Does java vector allow null?

895