[TOC]
----------------------------------------------------------------------------------------------------
# Hello, world!
The program is:
project1/hello_world.groovy
````groovy
println "Hello world!"
````
The execution is:
````shell
>groovy hello_world.groovy
Hello world!
````
See [here](#running_by_java_runtime) to know how to compile a Java class file
out of this Groovy script and to run it in Java runtime.
----------------------------------------------------------------------------------------------------
# Variables
Also see [, [Semantics](https://groovy-lang.org/semantics.html)].
project1/variables.groovy
````groovy
````
----------------------------------------------------------------------------------------------------
# Data types
Also see [, [Object orientation](http://groovy-lang.org/objectorientation.html)].
## Numbers
project1/data_types_numbers.groovy
````groovy
````
````shell
>groovy data_types_numbers.groovy > data_types_numbers_out.txt
````
The result is:
## Strings
Also see:
- [, [4. Strings](http://groovy-lang.org/syntax.html#all-strings)]
- []
project1/data_types_strings.groovy
````groovy
````
## Boolean
Also see [, [The Groovy Truth](
https://docs.groovy-lang.org/latest/html/documentation/core-semantics.html#the-groovy-truth)].
Different value types may be converted to `boolean` when required.
project1/data_types_boolean.groovy
````groovy
````
----------------------------------------------------------------------------------------------------
# Operators {#operators}
Also see []:
- [Operators](http://groovy-lang.org/operators.html)
- [10. Operator overloading](http://groovy-lang.org/operators.html#Operator-Overloading)
project1/operators.groovy
````groovy
````
----------------------------------------------------------------------------------------------------
# Control structures
## Conditionals
Also see [, [1.3.1. Conditional structures](
http://groovy-lang.org/semantics.html#_conditional_structures)].
project1/conditionals.groovy
````groovy
````
## Loops
Also see [, [1.3.2. Looping structures](
http://groovy-lang.org/semantics.html#_looping_structures)].
project1/loops.groovy
````groovy
````
## Exception handling
Also see [, [1.3.3. Exception handling](
http://groovy-lang.org/semantics.html#_looping_structures)].
project1/exceptions.groovy
````groovy
````