Kotlin fire exemplu

Exemple de cod

5
0

kotlin fir

runBlocking {
    val job = launch(Dispatchers.Default) {  
        println("${Thread.currentThread()} has run.") 
    }
}
1
0

fir în 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()

Pagini similare

Pagini similare cu exemple

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................