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 predicate in java?
What is instance means in java?
Can a main method be overloaded?
what is the difference between @include page and @include file
What is method Overloading in the perspective of OOPS?
What is data string?
What is class forname?
Explain the concept of hashtables?
What is meant by oops concept in java?
Can we use different return types for methods when overridden?
What is percentage in java?
Explain in detail about encapsulation with an example?