5

what the fuck are "covariant" return types...
I've been using java since java exists through all different versions. Mostly for web development.

Today I discovered "covariant" return type. What a shitty name.
I think I used the concept even without being aware of it...maybe just -oh- because Eclipse is allowing or even suggesting it.

I honestly cannot develop without Eclipse suggestions.

But here I am, survived 30 here in the business, developing end-to-end web applications for thousand of customers and deploying them.

And failing stupid questions in moronic interviews. Fuck.

PS also I don't use Streams. sorry.

Comments
  • 0
    It has to do with generics and inheritance/casting
  • 0
    @halfflat I just read that and still don't have a good grasp of what a covariant return type is. WTF

    I get the subtype part, but not the leap to covariant. Does C++ do this? Maybe an actual return type would help. I dunno.
  • 0
    @halfflat Ah, okay. To me it would be weird to not be covariant. Thanks!
  • 1
    In fairness, that's a bit of a harsh question. Most Java Devs I know would struggle to answer that, and they're no less capable because of it.

    Streams though - probably worth skilling up on that. They're pretty much a requirement in modern Java these days, and you'll often get interview questions on them as a result.
Add Comment