// hello.groovy — your first Groovy script. Run: groovy hello.groovy println 'Hello, Groovy!' def name = args ? args[0] : 'Groovy learner' println "Welcome, $name!" // Groovy runs Java too: any Java code is (almost always) valid Groovy System.out.println("Java style works as well"); println "Java version: ${System.getProperty('java.version').split(/\./)[0]}+"