I have tried below array example in my scala console.Declared immutable array, tried to change the array index values.Immutable should not allow modifying the values. I don't understand whats happening .can anyone explain, please.
val numbers=Array(1,2,3)
numbers(0)=5
print numbers
res1: Array[Int] = Array(5, 2, 3)
Thanks!