Answers for "kotlin arrays"

2

kotlin arrays

val cars = arrayOf("Volvo", "BMW", "Ford", "Mazda")

  cars[0] = "Opel"

  println(cars[0])
Posted by: Guest on September-09-2021
8

kotlin array

val a: Array<Double> = arrayOf(3.0, 4.5, 8.0, 19.0)
Posted by: Guest on May-09-2020
1

kotlin size of array

arr = arrayOf(10, 20, 30, 40, 50)

// Use the size attribute
println(arr.size)
Posted by: Guest on October-29-2020
1

how to make array in kotlin

val num = arrayOf(1, 2, 3, 4)   //implicit type declaration
val num = arrayOf<Int>(1, 2, 3) //explicit type declaration
Posted by: Guest on June-04-2020

Browse Popular Code Answers by Language