Chapter 1. Why add Groovy to Java?
Figure 1.1. Groovy generates bytecodes for the Java Virtual Machine. Either compile them ahead of time or let the groovy command generate them from source.
Figure 1.2. Arrays and strings from a duck-typing point of view. Each is a collection with an append method. If that’s all we care about, they’re the same.
Chapter 2. Groovy by example
Figure 2.1. The Google Chart API “Hello, World” example
Figure 2.2. Apply collect to a map to convert it into a list, where each entry is transformed into a string.
Figure 2.3. The “Hello, World” Swing user interface, holding the image returned by Google Chart
Figure 2.4. Groovy Baseball is a web application that shows the results of MLB games on a given date.
Figure 2.5. Building Groovy Baseball, part 1—geocoding stadium data and saving in DB
Figure 2.6. Building Groovy Baseball, part 2—extracting box score data and creating output POGOs
Figure 2.7. Building Groovy Baseball, part 3—drive system and generate XML
Figure 2.8. Links to baseball games played on May 5, 2007
Chapter 3. Code-level integration
Figure 3.1. Guide to integration features. Groovy can be accessed with Java classes alone using the JSR 223 script engine. If you are willing to add some Groovy library classes to Java, the Eval, GroovyShell, and Binding classes make working with scripts easy. The best way to combine Groovy and Java is using classes for both languages.
(try again in a couple of minutes)