📅  最后修改于: 2022-03-11 14:52:24.433000             🧑  作者: Mango
fun main(args: Array) {
for (str in args) {
try {
val parsedInt = str.toInt()
println("The parsed int is $parsedInt")
} catch (nfe: NumberFormatException) {
// not a valid int
}
}
}