7 ms·
That is how object oriented languages work. It is a constant reference to a mutable object. final int[] arr = {1, 2, 3}; arr[1] = 10; is valid Java.
by ollran 7y ago
That is how object oriented languages work. It is a constant reference to a mutable object.
final int[] arr = {1, 2, 3};
arr[1] = 10;
is valid Java.