sequences

Creating numeric and character sequences using Groovy ranges.

10 Groovy Range Examples for Working with Sequences

Learn Groovy ranges with 10 practical examples. Create numeric, character, and date ranges. Inclusive, exclusive, and reverse. Tested on Groovy 5.x. “A range is the simplest way to express a sequence. If you can count it, Groovy can range it.” Dierk König, Groovy in Action Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 20 minutes A Groovy range lets you express a sequence of values – numbers, characters, dates, ... Read More