Java question

Feb 11, 2008 04:54


interface IBar ( Read more... )

Leave a comment

Comments 8

catamorphism February 11 2008, 13:44:02 UTC
I don't know, but there is a Java language specification that you could go read :-)

Reply

r_transpose_p February 11 2008, 13:47:46 UTC
What are you doing up so late/early? Aren't you on west coast time?

Reply

catamorphism February 11 2008, 14:01:36 UTC
I get up earlier / go to bed earlier lately. (IT'S THIS MANHOOD THING, SO MUCH ENERGY...)

Reply


soong February 11 2008, 15:22:35 UTC
I'm pretty sure that overloading in a subclass and only changing the return type is forbidden. IMFO, IBazPrime won't compile.

Reply

r_transpose_p February 11 2008, 15:25:31 UTC
Eclipse lets me get away with it. If I can't count on this behavior, I should probably change my code now ;)

Reply

bk1e February 11 2008, 16:18:30 UTC
Apparently Sun added covariant return types at some point:

http://java.sun.com/developer/JDCTechTips/2004/tt1201.html

Reply

r_transpose_p February 11 2008, 16:24:24 UTC
Cool, thanks.

Reply


tyedie February 12 2008, 21:20:02 UTC
I think the answer to both questions is "yes", but I'm not sure. Have you yet answered the question for yourself? Let me know how it comes out, if you do.

Reply


Leave a comment

Up