Answers for "when (this) kotlin"

2

kotlin when

fun signAsString(x: Int)= when {
 x < 0 -> "Negative"
 x == 0 -> "Zero"
 else -> "Positive"
}
Posted by: Guest on January-15-2021

Browse Popular Code Answers by Language