Could any give more examples for covariant returns, Any link would be appreciated..
thanks
Sathya Shanmugam
Ranch Hand
Joined: Mar 02, 2007
Posts: 45
posted
0
And also like to have some explanation with example for the following statement from KB book
" Overriding methods can do so only within the bounds of covariant returns"...
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
posted
0
Hi Sathya,
" Overriding methods can do so only within the bounds of covariant returns"...
New Thing to learn: You may have heard of bridge method; How does JVM handle to call the overridden method with covariant return type; The compiler automatically inserts the following in the subclass(in out example)