-
1. Thread instance class WorkerThread : Thread() { override fun run() { var i = 0 while (i < 10) { i += 1 Log.i("WorkerThread","$i") } } 2. Runnable interface Thread { var i = 0 while (i < 10) { i += 1 Log.i("WorkerThread","$i") } }.start()