I want to save to an `ArrayList` every number but the last digit of each line of the file.

The file looks like this:

```
8.1,6.5,4.4,3.2,1

8.9,5,1.4,0.1,1

8.7,6.2,4.3,3.2,3

```

I have this code but that just saves everything in the `ArrayList`:

```java
try (Scanner file = new Scanner(new File("file.txt")).useDelimiter(",")) {
    while (file.hasNextLine()) {
        arr.add(file.nextLine());
    }
}

```