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[]{}); -------------------------
Date[] arrayOfDates = listOfDates.toArray(new Date[0]);
No comments:
Post a Comment