Object-oriented, dynamic, with a functional flavor
But also supports static type checking &
static compilation
@RestController
class ThisWillActuallyRun {
@RequestMapping("/")
String home() {
return "Hello World!"
}
}
String fileContents = new File('/path/to/file').text
String fileContents = new File('/path/to/file').getText('UTF-8')
new File('/path/to/file').eachLine { line -> println line }