So in my program I split the first row of data imported by a csv file into an array. Is there anyway that I can add this array into an array list as the first element? Because once I split the second data into an array by a delimiter I then want to store this array in the same arraylist but in element 2. A bit confusing but to summarize is nested arrays in an arraylist possible?
public static ArrayList<String[]> readCSV(Scanner csv, String delimiter, int minCellsPerRow) {
String line = csv.nextLine();
String[] parts = line.split(delimiter);
List<String> list = new ArrayList<String>();
list.add(parts);
}
list.add(list.size(), parts)
– Muhammad Tauseef Mar 18 at 1:19