Programming Help by Programmer's hub

Groovy Programming language

Groovy is an Object oriented Programming language for the java platform. The syntax of the groovy language is same as that of java language. Groovy is a dynamic language which provide the many features as that of the Python, Ruby, Perl, and Smalltalk programming languages. If you want to access the power of the Java Virtual Machine and Development Kit libraries when programming, but don't want to learn the Java Language, you can use Groovy instead. Groovy seamlessly integrates with all existing Java classes and libraries

Groovy Programming code example

class Greet {
 def name Greet(who) { name = who[0].toUpperCase() + who[1..-1] } def salute()
 println "Hello $name!"
g = new Greet('world') // create object 
g.salute() // output "Hello World!" 

Groovy Programming language


Features of Groovy language

  • Easy learning curve
  • Support for domain-specific languages
  • Compact syntax
  • Support for dynamic typing
  • Powerful processing primitives
  • Ease of Web application development
  • Support for unit testing