How do I keep track of my correct answer in an array list after shuffling it?
<p>Code:</p>

<pre><code>       private void getAnswers(int Type) {
    /* 
     * Getting answers here
     */
    //int randomValue = random(4);
    try { 
    String answers_list[][] = {
            {"Answer 1-1", "Answer 2-1", "Answer 3-1", "Answer 4-1"}, 
            {"Answer 1-2", "Answer 2-2", "Answer 3-2", "Answer 4-2"},
            {"Answer 1-3", "Answer 2-3", "Answer 3-3", "Answer 4-3"},
            {"Answer 1-4", "Answer 2-4", "Answer 3-4", "Answer 4-4"},
            {"Answer 1-5", "Answer 2-5", "Answer 3-5", "Answer 4-5"}} ;
    //answer1.setText(answers_list[Type][randomValue+1 &gt; 3 ? (randomValue+0)-4 : randomValue+0]); 
    //answer2.setText(answers_list[Type][randomValue+2 &gt; 3 ? (randomValue+1)-3 : randomValue+1]); 
    //answer3.setText(answers_list[Type][randomValue+3 &gt; 3 ? (randomValue+2)-2 : randomValue+2]); 
    //answer4.setText(answers_list[Type][randomValue+0 &gt; 3 ? (randomValue+3)-4 : randomValue+3]);
    Collections.shuffle(Arrays.asList(answers_list[Type]));
    answer1.setText(answers_list[Type][0]);
    answer2.setText(answers_list[Type][1]);
    answer3.setText(answers_list[Type][2]);
    answer4.setText(answers_list[Type][3]);
    /*for (int rows = 0; rows &lt; answer&amp;*list.length; rows++){
    for (int cols = 0; cols &lt; answers_list[rows].length; cols++){   
      }
        }*/
    } catch(Exception ex){
    answer1.setText("Error "+ex);
    }



}
</code></pre>

<p>I want <code>"Answer 1-1"</code>, <code>"Answer 1-2"</code>, <code>"Answer 1-3"</code>, <code>"Answer 1-4"</code>, <code>"Answer 1-5"</code> to be correct answers, and I'm using this to check if answer's correct or not...</p>

<pre><code>switch(view.getId()){
    case R.id.button5:
        clicks++;
        if(clicks &gt; 0)
        beginn.setText("Next");
        break;
    case R.id.button1:
        if(answer == 1)
        correct++;
        else
        correct--;
        break;
    case R.id.button2:
        if(answer == 2)
            correct++;
            else
            correct--;
        break;
    case R.id.button3:
        if(answer == 3)
            correct++;
            else
            correct--;
        break;
    case R.id.button4:
        if(answer == 4)
            correct++;
            else
            correct--;
        break;
</code></pre>

<p>Basicly, I need to set my <code>answer</code> integer to something, how do I do that?</p>

<p><strong>EDIT:</strong> I know it's <code>answer = number;</code> , but what number? How I check if it's <code>"Answer 1-1"</code>, after my array list has been shuffled? Without doing something like:</p>

<pre><code> if(answers_list[Type][0] == "Answer 1-1")
 answer = 1;
 else if(answers_list[Type][1] == "Answer 1-1")
 answer = 2;
</code></pre>
