It depends on how it copies the elements, but if it creates an ArrayList -copy like this
new ArrayList<Something>(inputCollection);
or if he does
someCopy.addAll(inputCollection);
then it will go through inputCollection.toArray() , which is probably best implemented by ArrayList .
aioobe
source share