Line length

Report a typo

There is a val line: String? value. Print its length or -1 if the line is null.

Write a program in Kotlin
fun main() {
val line: String? = readLine()
// write your code here. Do not change line above
println(line.length)// need a fix

}
___

Create a free account to access the full topic