From 54d52db4b92375b20c3de987703b60eb7216ec23 Mon Sep 17 00:00:00 2001 From: mushroomcarbon Date: Sun, 24 Sep 2023 06:13:29 +0800 Subject: [PATCH] first --- .idea/.gitignore | 8 ++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ Lab2.iml | 22 ++++++++++++++++++++++ src/DataTypes.java | 3 +-- 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 Lab2.iml 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..6ff3c251 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..dd47d373 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lab2.iml b/Lab2.iml new file mode 100644 index 00000000..03a7b649 --- /dev/null +++ b/Lab2.iml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/DataTypes.java b/src/DataTypes.java index 4f807c1f..7601f4dd 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -1,10 +1,9 @@ import java.util.List; 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; + long s = 0; // below is a "foreach" loop which iterates through numbers for (int x : numbers) { s += x;