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
What is a java applet? What is an interface?
Do I need java for windows 10?
what is session in java?
Which collections are thread safe in java?
What exceptions occur during serialization?
How to declare an arraylist in java?
What is an anonymous class in java?
What are the types of collections in java?
What do you know about the garbate collector?
What are the actions that can occur when a thread enters blocked state?
Is java still necessary?
How is abstraction implemented in java ?
explain the difference between jdk and jvm?
Does java isempty check for null?
How garbage collection is done in java?