how to make array in kotlin
snippet in kotlin

kotlin array

user8966

val a: Array<Double> = arrayOf(3.0, 4.5, 8.0, 19.0)

how to make array in kotlin

user4538

val num = arrayOf(1, 2, 3, 4)   //implicit type declaration
val num = arrayOf<Int>(1, 2, 3) //explicit type declaration