kotlin thread
runBlocking {
val job = launch(Dispatchers.Default) {
println("${Thread.currentThread()} has run.")
}
}
filo di kotlin
/// this code is actaully for kotlin but works in Java with changes.
Thread(Runnable{
// here goes you code that runs in the background
}).start()