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()
2.1m questions
2.1m answers
60 comments
56.8k users