I have an array with dates called startDates
. I also have an array with dates called endDates
. I also have an array with longs called dateDifferences
. Now, I print somewhere in my code, the start date, along with the difference (calculated using startDate
and endDate
) beside it. Then I repeat this for all the Date objects. However, I need to have my startDates
printed in order. How can I achieve this so that the difference is beside the respective startDate
?
ArrayList <Date> startDates = new ArrayList<Date>();
ArrayList <Date> endDates = new ArrayList<Date>();
ArrayList <Long> dateDifferences = new ArrayList<Long>();
In these arrays I add the pairs startDate and endDate and dateDifference in their respective arraylists.