質問編集履歴
2
era
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
arraylist addの使い方【JAVA】
|
1
|
+
erarraylist addの使い方【JAVA】
|
test
CHANGED
@@ -74,4 +74,18 @@
|
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
+
エラー;
|
78
|
+
|
77
|
-
|
79
|
+
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 5 out of bounds for length 5
|
80
|
+
|
81
|
+
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
|
82
|
+
|
83
|
+
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
|
84
|
+
|
85
|
+
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
|
86
|
+
|
87
|
+
at java.base/java.util.Objects.checkIndex(Objects.java:359)
|
88
|
+
|
89
|
+
at java.base/java.util.ArrayList.get(ArrayList.java:427)
|
90
|
+
|
91
|
+
at Main.main(Main.java:50)
|
1
sc al
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
```JAVA
|
6
|
+
|
7
|
+
Scanner sc = new Scanner(System.in);
|
8
|
+
|
9
|
+
List<Double> al = new ArrayList<Double>();
|
6
10
|
|
7
11
|
int b = -1;
|
8
12
|
|