Java reference type array memory model? Does each element of the object array have a reference in stack memory?
read the tutorials of the two teachers, and draw memory diagrams a little different
related codes
Person[] per = new Person[]{
new Person("A", 1),
new Person("B", 2),
new Person("C", 3)
};
version 1:
2: