Are arrays in java pass by reference or pass by value?
问题 Are arrays in java pass by reference or pass by value? (I've similar questions asked before, but none of them seemed to get a good answer, so hopefully this time will be different). Suppose I have an array called data that contains Objects of some type. Now let us suppose that I pass and store that array in class A and then I pass it to class B and class B changes one of the entries of the array. Will class A's version of the array change? Does it matter if this was an array of primitives