teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

ww

2021/10/30 09:45

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -27,4 +27,11 @@
27
27
  文字列型のリストのindex番号を整数型に変換したらエラーが出て
28
28
  解決のためにtrycatchをきさいしたのですができませんでした。
29
29
  total += Integer.parseInt(quantity);
30
- 上記のように文字列のリストを変換はできないでしょうか?
30
+ 上記のように文字列のリストを変換はできないでしょうか?
31
+
32
+ 修正
33
+ int total = 0;
34
+ for (int i = 0; i < fruitsPictorialPatternString.size(); i++) {
35
+ total += i;
36
+ }
37
+ へ変更