Looping Add comment to Wiki View in Wiki Edit Wiki page Printable Version

Groovy supports the usual while {...} loops like Java.

for loop

The for loop in Groovy is much simpler and works with any kind of array, collection, Map etc.

Note: you can also use the standard Java / C for loop if you wish.

closures

In addition, you can use closures in place of most for loops, using each() and eachWithIndex():

 

Search

Results of your search request can come from various sources: the Groovy website itself, the JIRA issues, the API documentation, as well as a few other interesting Groovy-related blogs.

  By  -  pages  -  views  - last modified