Groovy Basics

Getting started with Groovy programming. Covers installation, IDE setup, variables, data types, operators, and fundamental syntax for beginners.

Groovy TimeCategory and Date Manipulation – Cookbook with 10+ Examples

Groovy TimeCategory and date manipulation with 13 tested examples. Write 3.days.ago, 2.hours.from.now, and natural date arithmetic using Groovy’s built-in date DSL and GDK extensions. “There are only two hard things in computer science: cache invalidation and naming things.” Phil Karlton Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner-Intermediate | Reading Time: 18 minutes Our Groovy Date and Time post covers the java.time API – LocalDate, ZonedDateTime, Duration, and the modern approach to dates. This ... Read More

Groovy Shell (groovysh) – Interactive REPL with 10 Tested Examples

The Groovy Shell (groovysh) REPL is covered here with 10 tested examples. Learn commands, tab completion, multi-line input, imports, and scripting tips on Groovy 5.0.6. “The best way to learn a language is to have a conversation with it. A REPL is that conversation.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner | Reading Time: 14 minutes If you’ve installed Groovy and want a quick way to experiment with code without creating files, the ... Read More

Groovy Exception Handling – try-catch-finally with 12 Tested Examples

This guide covers Groovy exception handling with 12 tested examples. Learn try-catch-finally, custom exceptions, multi-catch, and error handling best practices on Groovy 5.0.6. “Exception handling is not about preventing errors. It is about deciding what happens when errors inevitably occur – and making sure your program keeps its promises.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 18 minutes Things go wrong. Files disappear, networks drop, users enter garbage ... Read More