Core concept
val a = Array(1, 2, 3)
a(0) = 10
a.length // 3Advertisement
How it works
Mutable — shared state issues. Convert to immutable for exposure.
Advertisement
Trade-offs + gotchas
Performance-critical numerics. Java interop.
val a = Array(1, 2, 3)
a(0) = 10
a.length // 3Mutable — shared state issues. Convert to immutable for exposure.
Performance-critical numerics. Java interop.