I am trying to do this with (similar to java)
val disabledNos = intArrayOf(1, 2, 3, 4) var integers = Arrays.asList(disabledNos)
but it does not give me a list. Any ideas?
Kotlin supports the standard library for this conversion.
You can directly use
disableNos.toList()
or if you want to change it:
disableNos.toMutableList()
It is very simple:
var integers = Arrays.asList(disabledNos).toList()
Source: https://habr.com/ru/post/1272490/More articles:Make application layer loosely coupled - javaError: redirect_uri_mismatch (ASP.NET MVC) - c #How to search using pdf.js? - javascriptAndroid O Pinned Shortcuts - intent filter CREATE_SHORTCUT - androidJava 9 modules, does static imply shallow reflection? - javaJoda-time-by-one error when counting days after 1918-03-24 - javaJava 9 webstart JNLP Service produces IllegalAccess - javaWriting an Asynchronous Process to Expect - c #Left join doctrine 2 - phpEnabling the synchronous async method (FTP / Upload) - c #All Articles