r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

Show parent comments

155

u/[deleted] Apr 06 '22

[removed] — view removed comment

29

u/Cilph Apr 06 '22

The truth is you simply don't use inheritance much outside of theory. Only use it for a strict is-a relationship where you actually need to substitute it. And even then interfaces might fit your need better. Outside of that, composition feels like the way to go.

11

u/NewNugs Apr 07 '22

Tell me you're junior without telling me you're junior.

-1

u/Cilph Apr 07 '22

Or we could engage in mutually beneficial discussion rather than throwing 10-ish years of professional Java experience down the trash because "lol, junior"

0

u/Im-Learnd1ng Apr 07 '22

Don't worry about him, his username tells me he's still excited about the fresh bag he just got.

→ More replies (1)
→ More replies (1)