title: post increment inside an if statement
body: <p>My output is always 10 even though half of my answers are wrong.</p>
  <pre><code>package LabExercise;
  
  import java.util.Scanner;
  import java.util.InputMismatchException;
  
  public class LabExer5B {
  
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
  
          try {
              
              String[] Questions = new String[10];
              String[] Choice = new String[10];
              Questions[0] = &quot;1. What is the biggest island in the Philippines?&quot;;
              Questions[1] = &quot;2. Jose Rizal's birthday?&quot;;
              Questions[2] = &quot;3. Jose Rizal's death anniversary?0&quot;;
              Questions[3] = &quot;4. What is the capital of the Philippines?&quot;;
              Questions[4] = &quot;5. Festival held in Baguio City every february?&quot;;
              Questions[5] = &quot;6. Andres Bonifacio's birthday?&quot;;
              Questions[6] = &quot;7. Independence day of Philippines?&quot;;
              Questions[7] = &quot;8. How many islands are there in the Philippines?&quot;;
              Questions[8] = &quot;9. One of Jose Rizal's famous novel when he was imprisoned?&quot;;
              Questions[9] = &quot;10. Writer of Lupang Hinirang?&quot;;
  
              Choice[0] = &quot;A. Luzon \nB. Mindanao \nC. Visayas&quot;;
              Choice[1] = &quot;A. June 19 \nB. December 30 \nC. November 2&quot;;
              Choice[2] = &quot;A. April 20\nB. December 30 \nC. October 15&quot;;
              Choice[3] = &quot;A. Manila City \nB. Taguig City \nC. Quezon City&quot;;
              Choice[4] = &quot;A. Mascara Festival \nB. Sinulog \nC. Panagbenga Festival&quot;;
              Choice[5] = &quot;A. March 18 \nB. October 28 \nC. November 30&quot;;
              Choice[6] = &quot;A. June 12 \nB. October 25 \nC. July 19&quot;;
              Choice[7] = &quot;A. 7107 \nB. 7023 \nC. 7192&quot;;
              Choice[8] = &quot;A. Noli Me Tangere \nB. Florante at Laura \nC. Ibong Adarna&quot;;
              Choice[9] = &quot;A. Sharon Cuneta \nB. Julian Felipe \nC. Rico Puno&quot;;
              
            
              String[] Answers = {&quot;A&quot;, &quot;A&quot;, &quot;B&quot;, &quot;A&quot;, &quot;C&quot;, &quot;C&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;B&quot;};
              String[] Letter = new String[10];
              boolean CAnswers = false;
              int score = 0;
           
              int j = 0;
              for(int i = 0; i &lt; 10;i++){
                   System.out.println(Questions[i]);
                  System.out.println(Choice[i]);
                  System.out.println(&quot;Enter your answer: &quot;);
                
                  Letter[j] = input.nextLine();
                  if (Letter[j].equalsIgnoreCase(Answers[j])){
                      score++;
                  }  
              }
              System.out.println(&quot;Your score is &quot; + score);
          } catch (InputMismatchException e) {
              System.out.println(&quot;Please input a letter&quot;);
          }
      }
  }
  </code></pre>
  <p>I think it is not reading my if statement, do I need to change the if statement?</p>