collections

Working with lists, maps, and sets in Groovy.

Groovy GDK – Cookbook Guide with 10+ Examples

Explore the Groovy GDK (Groovy Development Kit) with 14 tested examples. Learn how Groovy extends JDK classes like String, List, Map, File, Object, and Number with hundreds of convenient methods. “The GDK is why Java developers fall in love with Groovy – it takes the classes you already know and adds the methods you always wished they had.” Dierk König, Groovy in Action Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner | Reading Time: ... Read More

Groovy GINQ – SQL-Like Collection Queries with 12 Tested Examples

Groovy GINQ for SQL-like collection querying. 12+ examples covering select, where, joins, groupby, aggregates, and nested queries. Tested on Groovy 5.x. “Why leave Groovy to write SQL when you can bring SQL into Groovy? GINQ lets you query collections like database tables – right in your code.” Paul Deitel, Java How to Program Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 25 minutes What is GINQ in Groovy? If you’ve ever ... Read More

Groovy Spread Operator (*.) – Apply to All Elements with Examples

The Groovy spread operator (*.) lets you call methods and access properties on every element in a collection. 10+ tested examples with output on Groovy 5.x. “Why write a loop when a single operator can do the job? The spread operator is Groovy’s answer to ‘apply this to everything.'” Venkat Subramaniam, Programming Groovy 2 Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 15 minutes How many times have you ... Read More