I try to do this with (same as java)
val disabledNos = intArrayOf(1, 2, 3, 4)
var integers = Arrays.asList(disabledNos)
but this doesn't give me a list. Any ideas?
I try to do this with (same as java)
val disabledNos = intArrayOf(1, 2, 3, 4)
var integers = Arrays.asList(disabledNos)
but this doesn't give me a list. Any ideas?
Kotlin support in the standard library this conversion.
You can use directly
disableNos.toList()
or if you want to make it mutable:
disableNos.toMutableList()
Oops that was very simple:
var integers = disabledNos.toList()