How to write a Hello world in Groovy
In this tutorial, you will learn about how to write a hello world program in groovy.
- Create a new file called
helloWorld.groovy
. - Add the below code and save it.
println 'Hello World!'
- In your terminal run
groovy helloWorld.groovy
.
It will print Hello World!
.