Idea to Java ArrayLists

Louis Wasserman lowasser at google.com
Thu Jul 9 17:46:15 UTC 2015


Pavel, what you can do there is new ArrayList<>(Arrays.asList("1", "2",
"3", "4", "5"));

On Thu, Jul 9, 2015 at 10:40 AM Pavel Rappo <pavel.rappo at oracle.com> wrote:

> Not quite. You don't have the ability to specify a particular
> implementation
> (e.g. the thing won't work if what you want is, say, LinkedList)
>
> > On 9 Jul 2015, at 18:34, kedar mhaswade <kedar.mhaswade at gmail.com>
> wrote:
> >
> > Wouldn't Arrays.asList
> > <
> http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList-T...-
> >
> > work for you?
>
>



More information about the core-libs-dev mailing list