Kotlin: coroutines basics

Example:

import kotlinx.coroutines.*
Coroutines are a way to write asynchronous code in a sequential manner.

Solution:

GlobalScope.launch { delay(1000L) print("World!") } print("Hello, ") Thread.sleep(2000L)

Beginner's Guide to Kotlin