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 581 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
6
Write a function that returns the maximum of two integers in Kotlin10
How to flatten a list of lists in Kotlin2
Write a Kotlin code that prints 7 to the console.3
Write a Kotlin program that evaluates an arithmetic expression.4
Create a data class with a vip property implementing the Human interface5
Kotlin: Compile the following code and see the error.2
In Kotlin, adding an element to a list does not change the list.