JavaPatternMatching/resources/bytecode/javFiles/ForEach.jav
2024-01-19 16:29:59 +01:00

15 lines
288 B
Java

import java.util.ArrayList;
import java.lang.Integer;
public class ForEach {
m() {
var list = new ArrayList<>();
list.add(1); list.add(2); list.add(3);
var sum = 0;
for (var i : list) {
sum = sum + i;
}
return sum;
}
}