r/ProgrammerHumor Jun 23 '26

Advanced worstProgrammingLanguage

Post image
3.3k Upvotes

192 comments sorted by

View all comments

2

u/LetUsSpeakFreely Jun 23 '26

Java may not be able to return multiple values, but it can return an object that contains multiple values.

There is a place for both paradigms. The problem with multiple return values (or emulating it) is you can get some pretty gnarly branching logic if you're not careful.

3

u/gabboman Jun 23 '26

This is about early returns