How to get Input from user in Kotlin
import java.util.Scanner
fun main(args: Array<String>){
var cin = Scanner(System.`in`)
var name = cin.nextLine()
println("You have entered: ${name}")
}
fun main(args: Array<String>){
var cin = Scanner(System.`in`)
var name = cin.nextLine()
println("You have entered: ${name}")
}
Comments
Post a Comment
Let me know your doubts