Chapter 6. Groovy control structures

 

The pursuit of truth and beauty is a sphere of activity in which we are permitted to remain children all our lives.

 
 --Albert Einstein

At the hardware level, computer systems use simple arithmetic and logical operations, such as jump to a new location if a memory value equals zero. Any complex flow of logic that a computer is executing can always be expressed in terms of these simple operations. Fortunately, languages such as Java raise the abstraction level available in programs we write so that we can express the flow of logic in terms of higher-level constructs—for example, looping through all of the elements in an array or processing characters until we reach the end of a file.

In this chapter, we explore ...

Get Groovy in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.