I have the following line that prints a year and the matching fruit consumption; however I have 35 elements in each array that this line is got from.
I need help creating a loop that will parse rhe arrays and return the figure for each year.
//Display for one year. Needs a loop to run through ArrayList
System.out.println("Year: " + yearLabel.get(0) +" "+ berryData.get(0) + " "+ orangeData.get(0) +" "+ tangerineData.get(0)+"\n\n");
Can someone please push me in the right direction?