What is Co-Variant return type in method overriding?
Answer / 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 |
What is the static block?
What are the different collection views provided by maps?
Explain different states of a thread in java?
What is difference between float and double?
What are the different conditional statements?
How does split work in java?
Can we override protected method in java?
Can I uninstall java?
What are the basic control structures?
Explain creating threads by extending thread class ?
Any one can explain how the inerface uses in java. give with example.
What are the OOPS concepts in Java ?