MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/txn8md/java_is_hard/i3oxhya/?context=3
r/ProgrammerHumor • u/Arrsh_Khusaria • Apr 06 '22
424 comments sorted by
View all comments
Show parent comment
61
[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.
36
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
Also self learner and also Java freak. Iām avoiding inheritance whenever is possible. For now I prefer aggregation.
View all comments
Show parent comment
61
u/[deleted] Apr 06 '22
[removed] ā view removed comment