I am returning a large number of collections from a DTO object and was wondering if anyone could point me in the right direction. Any type of collection will work, but I do not know which one is best for the task of returning a large number of objects.
I know this can change based on threads and the like, but I'm at least looking for general recommendations and tests. In addition, I must stay within the standard Java collections (no third-party libraries).
: , ArrayList , , .
( , ), , .
- , , - .
An ArrayList, ( , DTO, , ) - Collection, . , - , . , , , ( ArrayList ).
ArrayList
Collection
ArrayList, ArrayList(int capacity).
ArrayList(int capacity)