I'm trying to convert dates dynamically. I tried this method but it is returning void.
How to make it an array of LocalDate
objects?
String[] datesStrings = {"2015-03-04", "2014-02-01", "2012-03-15"};
LocalDate[] dates = Stream.of(datesStrings)
.forEach(a -> LocalDate.parse(a)); // This returns void so I
// can not assign it.