Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
chopin
· 6y ago · 0 comments
orElseThrow does return a String, not an Optional. You also could use orElse(null) or orElse("null") depending on the use case (eg. using as a part of toString).
Comments
[–]
oftenwrong
6y ago
I'm useless without a compiler to check my types!