Groovy - (Main|Script Execution)
About
The main in groovy.
When run as :
- a script, the run() method is executed
- a class, the main method of the first class is executed.
- otherwise, the script is executed as is.
With groovy
With the groovy executable in the bin directory
- Shell
groovy helloWorld.groovy "Nico"
- Script
println "Hello "+args[0]
- Output:
Hello Nico