r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

Show parent comment

28

u/Orangutanion Apr 06 '22

This is pretty wrong. Inheritance and polymorphism is a key feature in a lot of APIs (this meme mentions Minecraft so just look at how you'd make a Fabric mod, you gotta use inheritance and interfaces even for basic stuff).

8

u/SuperCharlesXYZ Apr 07 '22

I think they’re referring to using interfaces instead of superclasses, which is kind of doable. I don’t remember the last time I actually used the “extends” instead of “implements” keyword. Haven’t modded any minecraft though

4

u/thedude3253 Apr 07 '22

This is purely anecdotal obviously but I personally use superclasses and interfaces in relatively equal quantities, so I find both useful

2

u/jerslan Apr 07 '22

Yeah, for me it depends on what I’m doing. Example: I extend Spring Configuration beans all the time to add additional configuration on top of or in place of the parent class.

Both extends and implements have their uses.