<RunTime Error when trying to take String input us...
# stackoverflow
u
RunTime Error when trying to take String input using readLine in Kotlin I am a beginner in kotlin and this is the code I tried to execute, but runtime error is being displayed. Please help me resolve this. import java.util.* fun main(args: Array) { var inp = Scanner(System.
in
); var t:Int = inp.nextInt(); repeat(t) { var n:Int = inp.nextInt(); var s:String = readLine()!! for (i in s) { println(i); } println() } } Exception in thread "main" kotlin.KotlinNullPointerException...