Divide arraylist of 750 into 150 sub arraylist

558fe5180e0e8fc922d31c23ef84d240

I have an ArrayList of 750 elements I would like to divide that ArrayList into 150 subarraylists so 5 elements to each subarraylist.

I have this code but it not working

while (scanner.hasNextLine()) {
            String t = scanner.nextLine();
            String[] ar = t.split(",");

            for (int i = 0; i < ar.length; i++) 
            {
                add.add(Double.parseDouble(ar[i]));
            }