Over a million developers have joined DZone.

Array To List An Vice Veras

DZone's Guide to

Array To List An Vice Veras

· ·
Free Resource
Convert an array to a list.

    listOfDates = Arrays.asList(arrayOfDates);


On the fly list construction:

    listOfDates = Arrays.asList(new Date[]{date1, date2});


Convert a list into an array:

Date[] arrayOfDates = listOfDates.toArray(new Date[]{});

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}