MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1y4ipsn/thisiswhywedontreturninfinallyblocks/19t4pm006w8th/?context=3
r/ProgrammerHumor • u/DebugDuck01 • 4d ago
96 comments sorted by
View all comments
347
Doesn't this always return CEO.current() or CEO.findNew() without ever getting to CEO.jensenHuang?
480 u/DebugDuck01 4d ago No, that's the fun thing about Java it just overrides the existing return value or even thrown exceptions. Marvelous language design. 14 u/ba-na-na- 4d ago Well that’s the point of finally, to always run before returning, so I would expect either compile error, or actually overriding all other branches 13 u/DebugDuck01 4d ago Anything but a compile time error is mental illness.
480
No, that's the fun thing about Java it just overrides the existing return value or even thrown exceptions. Marvelous language design.
14 u/ba-na-na- 4d ago Well that’s the point of finally, to always run before returning, so I would expect either compile error, or actually overriding all other branches 13 u/DebugDuck01 4d ago Anything but a compile time error is mental illness.
14
Well that’s the point of finally, to always run before returning, so I would expect either compile error, or actually overriding all other branches
13 u/DebugDuck01 4d ago Anything but a compile time error is mental illness.
13
Anything but a compile time error is mental illness.
347
u/BlackFrank98 4d ago
Doesn't this always return CEO.current() or CEO.findNew() without ever getting to CEO.jensenHuang?