I am having an array were I add several lists to this array. After that I would like to add other columns to this array which do not have the same length.
int minSize = Math.min(testList.get(j).getDate().size(), testList.get(j).getTotalReturnIndex().size());
List<String[]> data = new ArrayList<String[]>();
for(int m = 0; m < minSize; m++)
{
//TODO remove .replace('.', ',')
data.add(new String[] {testList.get(j).getCompanyName(), testList.get(j).getDate().get(m), testList.get(j).getCurrency(), testList.get(j).getTotalReturnIndex().get(m).toString().replace('.', ','), testList.get(j).getPrice().get(m).toString().replace('.', ','), "", sublist.get(m)});
//here I am getting an `java.lang.IndexOutOfBoundsException:` because the list is not so long like the others
}
This is how I add the first part(the first 5 columns of the picture) to the array.
Visualized in excel my array should look like that in the end:

How to add the other 3 columns to my array beginning with sublist based on the above code?
I really appreciate your answer!