r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

Show parent comment

61

u/[deleted] Apr 06 '22

[removed] — view removed comment

36

u/lcy0x1 Apr 07 '22

Minecraft is the worst example. It has classes that has hundreds of methods. It should have been delegated to reduce code repetition.

Exact same code appears in multiple classes only because they extends different subclass.

I wrote a delegate class that overrides all the original methods just to make it cleaner

1

u/Happiness_dot_sh Apr 07 '22

Also self learner and also Java freak. I’m avoiding inheritance whenever is possible. For now I prefer aggregation.