Tag Archives: Groovy

Cool Groovy features 2 – closures

A closure is a block of code (i.e. a function). In Java, to define a block of code, you would have to write a method or a class, but in Groovy you can write a closure and assign it to … Continue reading

Posted in Groovy | Tagged | Leave a comment

Cool Groovy features 1 – no need for getters and setters

Consider the following Java code: public class Customer{ private int id; private String firstName; private String lastName; public void setId(int id){ this.id = id; } public void setFirstName(String firstName){ this.firstName = firstName; } public void setLastName(String lastName){ this.lastName = lastName; … Continue reading

Posted in Groovy | Tagged | Leave a comment

Groovy

One of the technologies I’ve been playing around with recently is the Groovy language. It’s an interesting language as it offers a number of features not found in Java. Some of the these are features of the language itself, some … Continue reading

Posted in Groovy | Tagged | Leave a comment