Core concept

val a = Array(1, 2, 3)
a(0) = 10
a.length  // 3
Advertisement

How it works

Mutable — shared state issues. Convert to immutable for exposure.

Advertisement

Trade-offs + gotchas

Performance-critical numerics. Java interop.