Groovy classes
Defined class, create instance, call method
class Example {
def hello() {
println("Hello World")
}
}
e = new Example()
e.hello()
timestamp: 2019-04-09T12:00:01 tags:
- class
- new
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Defined class, create instance, call method
class Example {
def hello() {
println("Hello World")
}
}
e = new Example()
e.hello()
timestamp: 2019-04-09T12:00:01 tags: