DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Array To List An Vice Veras
Convert an array to a list.
List<Date> listOfDates = Arrays.asList(arrayOfDates);
On the fly list construction:
List<Date> listOfDates = Arrays.asList(new Date[]{date1, date2});
Convert a list into an array:
Date[] arrayOfDates = listOfDates.toArray(new Date[]{});






Comments
Snippets Manager replied on Wed, 2009/11/18 - 6:38pm
Date[] arrayOfDates = listOfDates.toArray(new Date[0]);