title: How to put continue in side forEach loop in java8
body: <p>How to write continue statement inside forEach loop in java 8.</p>
  
  <pre><code>List&lt;Integer&gt; numList = Arrays.asList(10,21,31,40,59,60);
  numList.forEach(x-&gt;{
      if(x%2==0){
          continue;
      }
      System.out.println(x);
  });
  </code></pre>
  
  <p>The above code is giving compile time Error saying <strong>Continue outside of loop</strong></p>
  
  <pre><code>List&lt;Integer&gt; numList = Arrays.asList(10,21,31,40,59,60);
  LOOP:numList.forEach(x-&gt;{
      if(x%2==0){
          continue LOOP;
      }
      System.out.println(x);
  });
  </code></pre>
  
  <p>The above code is giving compile time Error saying <strong>Undefined Label:LOOP</strong></p>