google-developer-training / kotlin-bootcamp

Report issues with the Kotlin Bootcamp for Programmers codelab
7 stars 2 forks source link

Kotlin Bootcamp issue: Wrong explanation of arrays in kotlin. #95

Open officer47p opened 3 years ago

officer47p commented 3 years ago

In the second part of the Kotlin Bootcamp, there is a section that says:

Unlike lists in Kotlin, which have mutable and immutable versions, there is no mutable version of an Array. Once you create an array, the size is fixed. You can't add or remove elements, except by copying to a new array.

But exactly on the next section, it says:

Note: With an array defined with val, you can't change which array the variable refers to, but you can still change the contents of the array.

You can find it in this link.

codelab: kotlin-bootcamp