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 / mohamed yehiya

If both signature are same, i.e parameters
and if the method has co-variant return type
which means return type of int in one method and
return type of long in another method.
Consider safely as the method is overloaded.

if otherwise it's neither overloaded or overrided
just an another method in the class.

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to reverse array in place?

1071


What are synchronized blocks in java?

1181


Can we overload the main() method?

1043


Does variable declaration allocate memory?

1044


How will you load a specific locale?

974


What type of variable is gender?

990


What are thread local variables?

1152


How does indexof work?

966


How to do encapsulation in java?

1053


What is mutable object and immutable object?

1130


What do you mean by formatting?

996


What is an escape character in java?

1037


What are functions in java?

950


What are the two types of exceptions in java? Which are the differences between them?

1100


What is a lambda expression ? What's its use ?

1108