Let's say I have 3 ArrayList <Integer>
.
The 1st AL is : [1,2,3,4].
The 2nd AL is : [5,6,7,8].
The 3rd AL is going to save all numbers from the other 2 AL, so it will be [1,2,3,4,5,6,7,8] or [5,6,7,8,1,2,3,4].
How to create a reference in memory from the 3rd AL to the 1st and 2nd, so that I don't need to create new objects for the 3rd list, just create a reference from memory cells of 3rd AL pointing to the 1st's and 2nd's AL objects.