header

Groovy

Groovy is an optional typed, dynamic language for the Java platform with many features that are inspired by languages like Phyton, Ruby and Smalltalk, making them available to Java developers using Java-like syntax.

Working with Groovy feels like a partnership between you and the language, rather than a battle to express what is clear in your mind in a way the computer can understand.

Characteristics

  • Object-oriented programming language
  • Dynamic Language
  • Cross-platform
  • Metaprogramming

Features

  • Write less code
  • Easy to test
  • Interface oriented
  • High-level concurrency
  • Wide-libraries support

Variables

/**
*   How variable assignment works
**/

def   x = 1
println x
x = 3.14159
println x
x = false
println x
x = "Groovy"
println x

Output:

1 3.14159 false Groovy

To browse examples go here

Return to the main article

comments powered by Disqus