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 |
How do you check if two given string are anagrams?
What are the notations in Java?
What are different types of encoding?
How to remove the trailing spaces from a string?
Why do we need variables?
what is session facade ?
How many types of parsers are there?
How to create an interface?
Name the method of a Container that can be used to cause a container to be laid out and redisplayed?
What is bubble sorting in java?
how you will prevent method overriding?
Explain creating threads by extending thread class ?