Hard
import kotlinx.coroutines.*
fun main() = runBlocking { // this: CoroutineScope
launch {
delay(200L)
println("BU - Task from runBlocking")
}
coroutineScope { // Creates a coroutine scope
launch {
delay(500L)
println("ZO - Task from nested launch ")
}
delay(100L)
println("GA - Task from coroutine scope ")
}
println("MEU - Coroutine scope is over ")
}
What is the output of the above program?
Author: W3D TeamStatus: PublishedQuestion passed 515 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
5
Write a function that returns the maximum of two integers in Kotlin7
How to flatten a list of lists in Kotlin2
How to add a new element to a list of Kotlin data class2
Print the value of a nullable string in Kotlin2
Concatenate two strings in Kotlin3
Write a Kotlin program that evaluates an arithmetic expression.4
Kotlin: Compile the following code and see the error.