CHAPTER 4Object-Oriented Groovy

Groovy is a fully fledged object-oriented (OO) language supporting all of the OO programming concepts that are familiar to Java developers: classes, objects, interfaces, inheritance, polymorphism, and others. Groovy is a pure OO language in which everything is an object. Don't let the fact that you can write scripts in Groovy fool you; the Groovy compiler will convert such scripts into Java classes of type groovy.lang.Script.

I don't like to label Groovy as a scripting language, because the term scripting is often associated with unwieldy, unstructured, and hard-to-read code that doesn't scale. This is absolutely not the case in Groovy. You can fully organize your code into classes and packages and at the same ...

Get Groovy and Grails Recipes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.