Medium
var chaine : String? = null
chaine?.let { println("string is $chaine") } ?: run { println("string was null. Setting the value to:")
chaine = "Kotlin"}
println(chaine)
What does the console show?
Author: W3D TeamStatus: PublishedQuestion passed 548 times
Edit
2
Community EvaluationsNo one has reviewed this question yet, be the first!
2
Concatenate two strings in Kotlin2
How to add a new element to a list of Kotlin data class1
In Kotlin, adding an element to a list does not change the list.4
Kotlin: Compile the following code and see the error.3
Write a Kotlin program that evaluates an arithmetic expression.5
Write a function that returns the maximum of two integers in Kotlin7
How to flatten a list of lists in Kotlin