For those who struggles with multi dimensional Array lists in Java

Av | 23. desember 2022
 import java.util.*;
    //...

    List<String[]> rowList = new ArrayList<String[]>();

    rowList.add(new String[] { "a", "b", "c" });
    rowList.add(new String[] { "d", "e", "f" });
    rowList.add(new String[] { "g", "h" });

    for (String[] row : rowList) {
        System.out.println("Row = " + Arrays.toString(row));
    } // prints:
      // Row = [a, b, c]
      // Row = [d, e, f]
      // Row = [g ,h]

    System.out.println(rowList.get(1)[1]); // prints "e"

We was struggling for a long time to find a way to create a good array to
hold our information from  database.

Legg igjen en kommentar