add string in array kotlin for loop code example
Example 1: how to declare string array in kotlin
//String[] in Java equivalent Array<String> in Kotlin
//eg.
var array1 : Array<String?> = emptyArray()
var array2: Array<String?> = arrayOfNulls(4)
var array3: Array<String> = arrayOf("Mashroom", "Kitkat", "Oreo", "Lolipop")
Example 2: add to array kotlin
var listofVehicleNames = arrayListOf("list items here")