title: Iterating Through Loop And Skipping Specific Index Points In Java
body: <p>I have this loop I am iterating through. I need to check for an int at every position except two points which will not have an int. I am trying to come up with the best way to skip those index points. </p>
  
  <pre><code>for(int i = 0;i &lt; 11;i++) {
      if(!Character.isDigit(number.charAt(i))){
          throw new SocSecException("At index "+i+" you should have a int ");
      }
  }
  </code></pre>
  
  <p>I was trying to wrap an extra if statement in suggesting </p>
  
  <pre><code>if(i == 3 &amp;&amp; i == 6 i++)
  </code></pre>
  
  <p>Hoping to skip the 3 and 6 index but instead it was not throwing errors anywhere in the check. </p>
  
  <p>How do I exclude the 3 index and 6 index from throwing an error in this statement?</p>