Need to convert String[] and pass it on a parameter that has Any data type, then from Any need to convert it to ArrayList<String>. Tried this but not working as it returns memory address.
arrayOf(anyObject).map { it.toString() }
You need to cast anyObject to Array, not create a new Array with anyObject as Element:
val str = arrayOf("a", "b", "c")
val anyObject: Any = str
val result = (anyObject as Array<*>).map { it.toString() }
println(result) // [a, b, c]
Array<*> is the key, thank you