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?



What is Co-Variant return type in method overriding?..

Answer / 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

More Core Java Interview Questions

how many ways to create Thread and which one is good? runnable interface ot Thread class?

3 Answers   Satyam,


What is the difference between throw and throws?

5 Answers   Cap Gemini,


How to re-get an object that is collected by garbage collector?

1 Answers  


What is the static method?

0 Answers  


How many digits is int32?

0 Answers  


What is the range of the char type?

3 Answers  


How GC (Garbage Collector) knows the objects reference is unused.Whether GC removes the unused object Parmanently or it maintains something.

2 Answers  


why use interface? if interface declear a method implement in class. why direct implement method in class

1 Answers   HCL,


What is connection class in java?

0 Answers  


Explain differences between checked and unchecked exceptions in java?

0 Answers  


how to convert Java project into Maven ?

0 Answers   Infosys,


What is thread life cycle?

0 Answers  


Categories