how to put getting rows from excel in an arrayllist in java? : The following code for reading the existing excel file in java. I want to get likely [[a, b], [b, c, d], [a, c, d, e], [a, d, e], [a, b, c], [a, b, c, d], [a], [a, b, c], [a, b, d], [b, c, e]]...
where [a,b] referred to one row in excel file.Please help me..


public class Excel {

    public static void main(String[] args) throws FileNotFoundException {
    	List<Set<String>> itemsetList = new ArrayList<>();
        Scanner scanner = new Scanner(new File("bc_dataset.csv"));
  scanner.next();
        while(scanner.hasNext()){
          
            String str=scanner.next();
            itemsetList.add(new HashSet<>(Arrays.asList(str.split(","))));
            System.out.println(itemsetList);
        }
        scanner.close();
    }

}