Skip to main content

A quick introduction to the Groovy language (part 2)

Posted by driscoll on April 14, 2012 at 3:35 PM PDT

In my previous post, I started with a simple Java program (which also worked in Groovy), and slowly stripped out the cruft until I was left with the following Groovy script:

def sayHello(name) {
    println("Hello $name!")
def name = 'world'

Now, let's add a little change to use an array.

Related Topics >>