ArrayList in Java when storing large objects
java
Solution
All objects in Java are stored as references, in containers and variables, etc, so in C++ terms, all containers only store pointers to the objects. In such a situation, the size of the object should be irrelevant for most if not all use cases.
Problem
I came across this interview question about arraylist in Java, and I feel it is quite interesting but no clue how to answer it: ``` What attention should be paid when using arrayList to store large object? ``` I wonder if we should answer this question in the regard of time/space coplexity? Thanks