System.arrayCopy() copies object or reference to object?
问题 I am having a final class NameAndValue . I copied an array of NameAndValue objects using System.arrayCopy() and when i changed a NameAndValue object in copied array, it gets reflected in the original array. public final class NameAndValue { public String name; public String value; public NameAndValue() { } public NameAndValue(String name,String value) { this.name = name; this.value = value; } } public class Main { public static void main(String[] args) { NameAndValue[] nv = new NameAndValue[4