Loading practice questions
What is delay() in Kotlin Coroutines?
Correct Answer: A — Suspends the coroutine without blocking the thread
Explanation:
The delay() function is a coroutine-friendly way to pause execution without blocking the thread, allowing other coroutines to run.
launch
{
println("Starting coroutine")
delay(1000)
println("Delayed message")
}