OOP

Object-oriented programming concepts: classes, objects, inheritance, encapsulation, and polymorphism.

Groovy Classes and Inheritance – Complete OOP Guide with 12 Examples

Groovy classes and inheritance are explained here with 12 tested examples. Learn class declaration, properties, methods, abstract classes, and polymorphism on Groovy 5.0.6. “A well-designed class hierarchy is like a well-organized toolbox – everything has its place, and you can find what you need without digging.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate | Reading Time: 20 minutes Object-oriented programming is the backbone of most real-world applications, and Groovy classes – as described ... Read More

Groovy Design Patterns – Singleton, Strategy, Observer with 10 Examples

Ask a Java developer for the Observer pattern and you get five files; ask a Groovy developer and you often get a list of closures. The Gang of Four ideas still matter on the JVM, but the ceremony does not. This guide works through Groovy design patterns, from @Singleton and closure-based Strategy to trait-backed Decorator, with 10+ tested examples. “Design patterns are not about being clever. They are about being clear. Groovy makes them so clear you almost forget they ... Read More

Groovy DataSet – 12 Tested Examples for Type-Safe Database Queries

Groovy DataSet for type-safe database queries. 12 examples covering findAll, sort, add, chaining, generated SQL.x with H2. “The best database code is the code that doesn’t look like SQL at all. Groovy’s DataSet lets you query databases with closures instead of strings.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate | Reading Time: 25 minutes What Is Groovy DataSet? If you have been writing raw SQL strings with groovy.sql.Sql, you know how easy it ... Read More