From fb94ef180f128f2a16801fabea86dbcd9117f9fc Mon Sep 17 00:00:00 2001 From: Emanuel Date: Mon, 16 Sep 2024 09:57:13 -0400 Subject: [PATCH] Changed s to long data type and passed test --- src/DataTypes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataTypes.java b/src/DataTypes.java index 4f807c1f..eebcb595 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -4,7 +4,7 @@ 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;