Idea to Java ArrayLists

Pavel Rappo pavel.rappo at oracle.com
Thu Jul 9 20:10:35 UTC 2015


> On 9 Jul 2015, at 20:46, Remi Forax <forax at univ-mlv.fr> wrote:
> 
> just to be complete , there is also
> 
>   ArrayList<String> l = new ArrayList<>();
>   Collections.addAll(l, "1", "2", "3", "4", "5");
> 
> which avoid the allocation of the intermediary list.

Thanks Remi, I forgot about that. That's arguably the next best thing after
a per-type factory.




More information about the core-libs-dev mailing list