-
-
Save codeforfun-jp/7cc105355a3501c55375a65eb5537e6a to your computer and use it in GitHub Desktop.
[Java Quiz ver2] 3-5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
/* 省略 */ | |
return insets; | |
}); | |
// quizDataからクイズ出題用のquizArrayを作成する | |
for (int i = 0; i < quizData.length; i++) { | |
// 新しいArrayListを準備 | |
ArrayList<String> tmpArray = new ArrayList<>(); | |
// クイズデータを追加 | |
tmpArray.add(quizData[i][0]); // 都道府県名 | |
tmpArray.add(quizData[i][1]); // 正解 | |
tmpArray.add(quizData[i][2]); // 選択肢1 | |
tmpArray.add(quizData[i][3]); // 選択肢2 | |
tmpArray.add(quizData[i][4]); // 選択肢3 | |
// tmpArrayをquizArrayに追加する | |
quizArray.add(tmpArray); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment