Thread.sleep and coroutine delay

The question is not actually about kotlin since you are referring to core java methods. The first reference in google answers it.

As for your code, you are trying to use blocking sleep method inside the coroutine which kills the idea of coroutines. Please read documentation on delay method.