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

How to do encapsulation in java?

1106


What is the use of static methods?

1097


What is garbage collector?

1134


What is variable length arguments in java?

1036


Can we sort hashmap in java?

999


What is an off by one error in java?

1001


In a class implementing an interface, can we change the value of any variable defined in the interface?

1146


Is singleton thread safe in java?

1028


What is array sorting in java?

1112


Can we extend a class with private constructor?

1076


What is off heap memory?

1071


Give me some null interfaces in java?

1121


Can a function return a function?

1100


Does chrome use java?

1027


Can constructor return value?

1015