0
Is there a max number of int inputs when declaring an input to an integer.
var x = readLine()!!.toInt() because I realized an error occurs if up to 11digits are inputted
1 Respuesta
+ 3
Yes, the type Int has a MAX_VALUE and a MIN_VALUE in Kotlin.
Int.MAX_VALUE // 2,147,483,647
Int.MIN_VALUE // -2,147,483,648
https://kotlinlang.org/docs/basic-types.html#integer-types