Answers for "introduction to kotlin programming"

0

Kotlin is like java

val age = 42

if (age < 10) {
    println("You're too young to watch this movie")
} else if (age < 13) {
    println("You can watch this movie with a parent")
} else {
    println("You can watch this movie")
}
Posted by: Guest on May-11-2020
0

Kotlin is like java

// if is an expression, so ternary operation not needed
val loaded = true
val status = if (loaded) "Ready" else "Loading..."
// "Ready
Posted by: Guest on May-11-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language