<human>: Convert the following Java 8 code using anonymous classes to Java 17 using the var keyword:

```java
// Java 8 code
List<String> list = new ArrayList<>();
for (String s : list) {
  System.out.println(s);
}
```

<bot>: ```java
// Java 17 code using var
var list = new ArrayList<String>();
for (var s : list) {
  System.out.println(s);
}
```