Answers for "kotlin else if"

0

kotlin else if

if (a > b) {
  // if
} else if (a == b) {
  // else if
} else {
  // else
}
Posted by: Guest on November-17-2020
-1

kotlin if-else

val time = 20
val greeting = if (time < 18) {
  "Good day."
} 
  else {
  "Good evening."
}
println(greeting)
Posted by: Guest on September-08-2021

Browse Popular Code Answers by Language