2.1. What you need to know about Groovy

If you already know Java, you have knowledge in three distinct areas:

  • The syntax/keywords of the Java language
  • The Java Development Kit (JDK) that contains many helpful collections and utilities
  • The Java runtime (Java Virtual Machine)

It would be a mistake to think that learning Groovy is like learning a new programming language from scratch. Groovy was designed as a companion to Java.

Groovy offers the productivity boost of a dynamic language (think Python or Ruby) because it doesn’t have as many restrictions as Java. But at the same time, it runs in the familiar JVM and can take advantage of all Java libraries. It completely removes some bulky features of Java and always attempts to minimize boilerplate ...

Get Java Testing with Spock 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.