ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What are Coroutines in Kotlin?
Correct Answer: B — Lightweight threads for asynchronous programming
Coroutines in Kotlin are a powerful way to handle asynchronous and concurrent programming efficiently. They allow you to perform background tasks without blocking the main thread.
import kotlinx.coroutines.*
fun main() = runBlocking
{
launch
{
println("Running a coroutine")
}
}