presumably_wrong

joined 1 year ago
[–] [email protected] 8 points 1 year ago (1 children)

I'd hope they come here but get a refresh. /r/cscareeradvice was basically just a circlejerk of you have to grind leetcode and work at faang or you're useless.

[–] [email protected] 1 points 1 year ago (1 children)

Instead of wrapping it in an optional you can do Objects.requireNonNullElse(value, defaultValue)

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (2 children)

In java 9 there is Objects.requireNonNullElse(obj, defaultValue)