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 contract between hashcode and equal method?
State one difference between a template class and class template.
Do I need to import java.lang package any time? Why?
What is native code?
What is meant by attribute?
What do you mean by hashing?
What is singleton class and how can we make a class singleton?
Does constructor creates the object ?
Difference between predicate, supplier and consumer ?
Why is singleton instance static?
Does google use java?
What is 16 bits called?
What is the static block?
What is use of a abstract variable?
What is use of static in java?