title: How to use "continue" in groovy's each loop
body: <p>I am new to groovy (worked on java), trying to write some test cases using Spock framework.
  I need the following Java snippet converted into groovy snippet using "each loop"</p>
  
  <h2>Java Snippet:</h2>
  
  <pre><code>List&lt;String&gt; myList = Arrays.asList("Hello", "World!", "How", "Are", "You");
  for( String myObj : myList){
      if(myObj==null) {
          continue;   // need to convert this part in groovy using each loop
      }
      System.out.println("My Object is "+ myObj);
  }
  </code></pre>
  
  <p>Groovy Snippet:</p>
  
  <pre><code>def myObj = ["Hello", "World!", "How", "Are", "You"]
  myList.each{ myObj-&gt;
      if(myObj==null){
          //here I need to continue
      }
      println("My Object is " + myObj)
  }
  </code></pre>