?
Which line of code is a shorter, more idiomatic version of the displayed snippet?
Which line of code is a shorter, more idiomatic version of the displayed snippet?
val len: Int = if (x != null) x.length else -1
val len: Int = if (x != null) x.length else -1
Join the Discussion
Login to post a comment or share your explanation.
Login