Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Array To List An Vice Veras

DZone's Guide to

Array To List An Vice Veras

·
Free Resource
Convert an array to a list.


List
  
    listOfDates = Arrays.asList(arrayOfDates);

  

On the fly list construction:


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

  

Convert a list into an array:


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

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}