A collection by definition is just a list of references. If you have an arraylist if objects, it is not the objects that are contained in the arraylist. That would be a nightmare to keep correlated, and inefficient. If it were, then there would need to be a contiguous block of memory to contain all of the objects. Every time the collection 'grew' out of it's memory space, the entire contents of the memory would have to be moved around in order to make room. While that might not seem like a big deal, consider that every single process loaded into memory would have to somehow store its state, rewrite its location in memory, and then somehow restore its state. Meanwhile the entire system would stop working while this was going on. If for some reason your collection grew too large to be contained in memory, then what? You would run out of memory, and your application would crash, or cause other applications to crash. Either way, it is not a satisfactory solution.
Languages are designed is to allow for flexibility and speed. By keeping a collection of references, the objects themselves can be written to any place that there is room without disturbing any other processes at all. If for some reason memory starts to run low, it is much quicker to write a small bit of data to the swap file than it is to have to write an entire collection of objects.
Is this making things any clearer for you?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdo
m will come to you that way" - Christopher Hitchens