Groovy Strings & GStrings
Master Groovy string handling: single, double and triple quotes, GString interpolation, and multiline text for scripting tasks.
Strings in Groovy
Groovy gives you several string literals, each for a job. Picking the right one keeps scripts clean and dodges escaping headaches.
Single-Quoted Strings
Single quotes make a plain String with no interpolation — what you type is exactly what you get.
def s = 'Hello World'
println sAll lessons in this course
- Introduction to Groovy & JVM
- Groovy Syntax & Basic Types
- Groovy Scripts & GShell
- Groovy Strings & GStrings