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
Is set thread safe java?
How do you check whether the list is empty or not in java?
Do you need to import math in java?
Is arraylist an object in java?
Which package has light weight components?
When is the finalize() called?
Which collection is thread safe in java?
What are the application of stack?
what is synchronization? : Java thread
List the interfaces which extends collection interface?
How do you do absolute value in java?
What are white spaces in java?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
What does the exclamation mark mean in java?
What is slash r?