7 3 4 7 1 7 4 5 3 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 J'obtiens l'erreur. Je ne connais pas la cause, alors pourriez-vous me le dire?
import java.util.Scanner;
public class Cardgame {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String inputStr1 = sc.nextLine();
String[] dataSet1 = inputStr1.split(" ");
int suziHennkann1 = Integer.parseInt(dataSet1[0]);
int suziHennkann2 = Integer.parseInt(dataSet1[1]);
String inputStr2 = sc.nextLine();
int num = Integer.parseInt(inputStr2);
int[] dataSet3 = new int[num];
for(int i = 0; i < num; i++) {
String inputStr3 = sc.nextLine();
String[] dataSet2 = inputStr3.split(" ");
dataSet3[i] = Integer.parseInt(dataSet2[i]);