Wed Apr 07 2021 10:12:03 GMT+0000 (Coordinated Universal Time)
Saved by @GoodRequest.
fun main() { println("main starts") routine(1, 500) routine(2, 300) println("main ends") } private fun routine(number: Int, delay: Long) { println("Routine $number starts to work") Thread.sleep(delay) println("Routine $number finished") }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments