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
How do you check if a number is a perfect square?
Differentiate between the constructors and methods in java?
How is final different from finally and finalize?
How hashset works internally in java?
How is it possible in java programming for two string objects with identical values not to be equal under the == operator?
What is append in java?
How do I get 64 bit java?
How will you communicate between two applets?
What will be the output of round(3.7) and ceil(3.7)?
What is the output of the below java program?
Can we overload run() method in java?
How do you find the maximum number from an array without comparing and sorting?
What is the benefit of inner / nested classes ?
What is the byte range?
What is not object oriented programming?