Inkompatible type error int[] int

Ich bin immer ein Fehler, inkompatible Typen: int[] konvertiert werden kann, um int. Kann jemand erklären, warum dies geschieht und was ich tun muss, um es zu beheben?
Vielen Dank für die Hilfe. Hier ist mein code:

public static String readFinalQuestionBank() throws Exception
    {   
        File textFile = new File("C:\\Users\\Joseph\\Documents\\School Files - NHCC\\CSci 2002\\FinalQuestionBank_JosephKraemer.txt");  //file location
        ArrayList<String> question;
        ArrayList<String> answer; 
        ArrayList<String> category;
        ArrayList<String> topic;


        int[] i = new int[0];
        String[] structure = {"OO Programming", "Generics", "Bags", "Complexity & Efficiency", "Stacks", "Recursion", "Sorts", "Queues",
                              "Lists", "Iterators", "Searching", "Associative Arrays/Hashing", "Trees/Heaps", "Graphs"};

        try
        {
            Scanner scan = new Scanner(textFile);                   //Scanner to import file

            while(scan.hasNextLine())                               //Iterator - while file has next line
            {
                String qBank = scan.nextLine();                     //Iterator next line
                String[] line = qBank.split("::");             //split data via double colon

                question[i]++ = line[0];    //error is here!!

                System.out.println(qBank);

            }
            scan.close();                  //close scanner

        }
        catch(FileNotFoundException e)
        {
             e.printStackTrace();
        }       
        return "";
    }//end method readFinalQuestionBank
Schreibe einen Kommentar