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

What is contract between hashcode and equal method?

1096


State one difference between a template class and class template.

1111


Do I need to import java.lang package any time? Why?

1456


What is native code?

1203


What is meant by attribute?

1205


What do you mean by hashing?

1166


What is singleton class and how can we make a class singleton?

1152


Does constructor creates the object ?

1082


Difference between predicate, supplier and consumer ?

1112


Why is singleton instance static?

1042


Does google use java?

1018


What is 16 bits called?

986


What is the static block?

1117


What is use of a abstract variable?

1049


What is use of static in java?

1239