Groovy |
Groovy is both a coloquialism and an object-oriented programming language designed for the Java platform as an alternative to Java programming language with features from Python programming language, Ruby programming language and Smalltalk.
The coloquialism extends primarily from 60 s subculture, describing when something is in the groove .
As for the programming language: Groovy uses a Java-like syntax which is dynamically compiled to Java Virtual Machine bytecodes and that works seamlessly with other Java code and Library (computer science). The Groovy Compiler can be used as an alternative to javac to generate standard Java bytecode to be used by any Java project or it can be used dynamically as a scripting language.
Groovy is currently undergoing standardization through the Java Community Process with the [http://www.jcp.org/en/jsr/detailid=241 JSR 241].
=Examples=
class Foo { def doSomething() { def data = [ name : James , location : London ] for (e in data) { println( entry ${e.key} is ${e.value} ) } }
def closureExample(collection) { collection.each { println( value ${it} ) } }
static void main(args) { def values = [1, 2, 3, abc ] def foo = new Foo() foo.closureExample(values) foo.doSomething() } }
=External links=
|
|