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 |
Is null a string?
Can a class be defined inside an interface?
What are multiple inheritances? Is it supported by java?
Why bytecode is called bytecode?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
explain multi-threading in java?
What is application system?
How will you add panel to a frame?
What methodology can be employed to locate substrings inside a string?
How do you classify Dialog Box?
How do you override a method in java?
What is type safety in java?