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 stack example?
What is keyword auto for?
What is string made of?
Explain the pointers in Java?
Why main method is called first in java?
Is it possible for a yielded thread to get chance for its execution again?
What is core java used for?
Why char array is favored over string for the storage of passwords?
What are disadvantages of java?
Where can I find jdk in my computer?
Is void a data type?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
How to instantiate static nested classes in java?
What is n in java?
How would you dynamically allocate memory to an array?