Join Slack
Powered by
Assuming you’re talking about a nullable? ie. an `...
# announcements
d
dalexander
11/07/2017, 7:58 PM
Assuming you’re talking about a nullable? ie. an
Int?
a good pattern is
val somethingElse = something ?: 0
where
0
is whatever you want the value to be when
something
is null.
Open in Slack
Previous
Next