Question: is array immutable in java?
Answer: Java arrays are always mutable in that you can assign new values to elements of the array. ... However, the length of an array is immutable. If you need to change the array length, you need to allocate a new array, copy over any elements you want to keep, and assign the new array to your variable/field/array element.