O'Reilly logo

Groovy and Grails Recipes by Bashar Abdul-Jawad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3Groovy Data Types and ControlStructures

Groovy data types can be categorized into simple data types and collective data types. Simple data types include strings, regular expressions (regexes), and numbers. Collective data types include lists, maps, and ranges. Groovy offers support for such data types at the language level, meaning that it offers native syntax for declaring and using special operators on them.

Groovy control structures can be categorized into conditional structures and looping structures. Conditional structures include the if statement, the ternary operator (?:), and the switch statement. Looping structures include while and for loops.

This chapter covers, by example, all of Groovy's supported data types and control ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required