ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is delay() in Kotlin Coroutines?
Correct Answer: A — Suspends the coroutine without blocking the thread
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")
}