Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right, I was thinking that this is the answer to the supposedly intractable problem posed by the original article.

Just make your ExampleInterface generic -- ExampleInterface<T>.foo() throws T.

That technique works really well, and I don’t understand why it isn’t more widely used (or at least it wasn’t when I last used Java for serious work).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: