Tsallaka zuwa abun ciki
Justice Tech School

Kotlin Arrays

arrayOf creates an array of fixed size. Index from 0. Use size, get, set and indices.

Example
val nums = arrayOf(5, 2, 9, 1)
nums[0] = 10
println(nums.size)
println(nums.sortedArray().joinToString())

Exercise

Create an array.

(1, 2, 3)

Quiz Test

First index.

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.