Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Kotlin is like java

// if is an expression, so ternary operation not needed
val loaded = true
val status = if (loaded) "Ready" else "Loading..."
// "Ready
Source by ttu.github.io #
 
PREVIOUS NEXT
Tagged: #Kotlin #java
ADD COMMENT
Topic
Name
1+2 =