Detect input mismatch

Report a typo

Consider the following Kotlin code snippet:

val userInput = readln()
val parsedInput = userInput.toInt()
If a user enters the string '2023a', what will be the behavior of this program?
Select one option from the list
___

Create a free account to access the full topic