title: How to get to next object in foreach
body: <p>Im making a quizz app in android studio.I have a slight issue. I display the questions and answers fine, but when the user click on a button, be it right or wrong answer, i want the next question to come.
  I feel its really stupid, but heres what i did.</p>
  <pre><code>private void getListe() {
          
          new Thread(new Runnable() {
              @Override
              public void run() {
                  QuizzController quizzController = new QuizzController(GameActivity.this);//bon contexte?
                  liste = quizzController.getGame(difficulte, categorie, nb);
  
          handlerGame.post(new Runnable() {
                      @Override
                      public void run() {
                          Toast.makeText(GameActivity.this,&quot;gg&quot;, Toast.LENGTH_SHORT).show();
                          for(QuizzRoom q : liste ){
                              tvQuestion.setText(q.question);
                              btnBadAnswer.setText(q.mauvaisesReponses);
                              btnGoodAnswer.setText(q.bonneReponse);
                          }
  
                          btnGoodAnswer.setOnClickListener(v -&gt; {
                              score+=10;
                               tvScore.setText(String.valueOf(score));
  
  
                          });
                      }
                  });
  
              }
          }).start();private void getListe() {
          
          new Thread(new Runnable() {
              @Override
              public void run() {
                  QuizzController quizzController = new QuizzController(GameActivity.this);//bon contexte?
                  liste = quizzController.getGame(difficulte, categorie, nb);
  
          handlerGame.post(new Runnable() {
                      @Override
                      public void run() {
                          Toast.makeText(GameActivity.this,&quot;gg&quot;, Toast.LENGTH_SHORT).show();
                          for(QuizzRoom q : liste ){
                              tvQuestion.setText(q.question);
                              btnBadAnswer.setText(q.mauvaisesReponses);
                              btnGoodAnswer.setText(q.bonneReponse);
                          }
  
                          btnGoodAnswer.setOnClickListener(v -&gt; {
                              score+=10;
                               tvScore.setText(String.valueOf(score));
  
  
                          });
                      }
                  });
  
              }
          }).start();
  </code></pre>
  <p>I cannot figure how to get to the next QuizzRoom object (answer+questions). Feels like it should just come right on when the loop  starts over, but it doesnt.</p>
  <p>Thanks in advance for any tips in the right direction.</p>