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 to do encapsulation in java?
What is the use of static methods?
What is garbage collector?
What is variable length arguments in java?
Can we sort hashmap in java?
What is an off by one error in java?
In a class implementing an interface, can we change the value of any variable defined in the interface?
Is singleton thread safe in java?
What is array sorting in java?
Can we extend a class with private constructor?
What is off heap memory?
Give me some null interfaces in java?
Can a function return a function?
Does chrome use java?
Can constructor return value?