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

What is Co-Variant return type in method overriding?

Answer Posted / harini

If the parent class method return type is object then child
class method return type need not be object. We can take
its child classes also.
The co-varient return types of no. class are
Byte/short/integer/long/float/double.
ex:
object-----string ----valid
number-----integer----valid
string------object----invalid

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why Java does not support multiple inheritances?

1113


Is java developer a good career?

962


How do you input a string in java?

991


Can we increase size of array?

971


How listener identify that the event came from a particular object?

1949


What will happen if a thrown exception is not handled?

952


What is the difference between overriding & overloading?

1002


How do you sort a string in alphabetical order in java?

870


What's the purpose of using break in each case of switch statement?

927


What is java and why do we need it? Explain

1045


Is there any limitation of using inheritance?

1023


What is array class in java?

1004


What is the difference between serializable and externalizable interfaces?

1024


what are the high-level thread states? : Java thread

946


What is the difference between state-based unit testing and interaction-based unit testing?

882