Loading practice questions
What are Coroutines in Kotlin?
Correct Answer: B — Lightweight threads for asynchronous programming
Explanation:
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")
}
}