jQuery in Action, 3rd edition
The moose likes Groovy and the fly likes What makes GROOVY Special? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "What makes GROOVY Special?" Watch "What makes GROOVY Special?" New topic

What makes GROOVY Special?

anandram venkataswamy

Joined: Oct 03, 2007
Posts: 9
Hello I have been hearing about groovy for a long time whats special about groovy? How far it is effective with Java?

These are some ameture questions.
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 471

Hello Anandram,

First of all, as a best practice, you should post your question once, so that all answers will be in the same post, both for your benifit, and for the community.

Secondly, scripting languages these days (Ruby & Groovy in particular) are gaining a lot of popularity. Dynamic typing, closures, the easy syntax and the real boost in productivity that they give due to the fact that they require less of lines of code compared to other languages are few of the reasons they are gaining that much popularity.

Groovy is an object oriented scripting language for the java platform, and its main features are dynamic typing, closures and operator overloading. When I say that it's for the java platform, I mean that it runs within the JVM, which gives it the advantages of java, like portability for instance.

I hope this answers your questions.

Visit my blog: http://jnassef.blogspot.com/
S Davis
Ranch Hand

Joined: Feb 07, 2006
Posts: 40
There are a number of dynamic languages vying for your attention on the JVM these days. If you are already a Ruby programming, JRuby makes perfect sense. If you already know Python, then Jython should be an attractive option. But if you don't know these languages, it can be a bit of an uphill battle.

Groovy, on the other hand, is Java syntax with some sugar sprinkled over it. Here is a shortcut for creating an ArrayList:

Ruby and Python have other ways of maintain a list, but Groovy's is the way you already know -- an ArrayList. I find myself slipping between Java and Groovy all the time because they are truly interchangeable. If you prefer the Java syntax, then use it. But if you like the Groovy syntax, you are still every bit the Java programmer. Nice fit, eh?
I agree. Here's the link: http://aspose.com/file-tools
subject: What makes GROOVY Special?
It's not a secret anymore!