diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..2740c6eb --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/DataTypes.java b/src/DataTypes.java index 4f807c1f..eeb342c6 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -3,10 +3,10 @@ public class DataTypes { // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java public static long sum(List numbers) { - - int s = 0; +// this expects a list of integers + long s = 0; // below is a "foreach" loop which iterates through numbers - for (int x : numbers) { + for (long x : numbers) { s += x; } return s;