Vidyalelo
Computer Science · Q286

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 286

Q286

You have started a long-running coroutine whose job you have assigned to a variable named task. If the need arose, how could you abort the coroutine? val task = launch // long running job

A.
task.join()
B.
task.abort()
C.
job.stop()
D.
task.cancel()
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board