https://kotlinlang.org logo
Title
u

user

07/22/2022, 9:41 PM
Can we print each statement for every 1 second or 5 seconds or any number of seconds in kotlin I want to print the following code which prints the numbers from 1 to 10 to be printed one by one with a time gap. I'm a beginner in Kotlin, so is there any method/or a function to do this?. If not what type of logic is required to achieve this?. fun main(){ var countNumbers= mutableListOf("1","2","3","4","5","6","7","8","9","10") for(i in countNumbers) { println(i) } }