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 |
i would like to attend for an interview of datalab technologies company i want to know the pattern of imnterview.
Can we define private and protected modifiers for variables in interfaces?
What is double checked locking in singleton?
What do you understand by copy constructor in java?
Can java program run without jre?
What is the main difference between java platform and other platforms?
What are data structures in java?
What are default methods ?
what is ennumaration?
Explain covariant method overriding in java.
What are the ways to instantiate the class class?
Which api is provided by java for operations on set of objects?