Introduction to Groovy
Learn Groovy - a dynamic JVM language
Intermediate⏱️ 35 minutes
Lesson Content
Introduction to Groovy
Groovy is a powerful, optionally-typed dynamic language for the JVM with static-typing and static compilation capabilities.
Key Features:
- Runs on the JVM
- Java-compatible
- Dynamic and static typing
- Closures
- DSL capabilities
Hello World:
println "Hello, Groovy!"
Variables:
def name = "Groovy"
def age = 20
def isJVM = true
String typed = "Explicit type"
Collections:
def list = [1, 2, 3, 4, 5]
def map = [name: "Alice", age: 30]
groovy
Loading...