Originally posted by Himanshu Gupta:
I want to know that can groovy be used in the java classes itself or it is something like ANT. Is it integrable with java code. Can we use Groovy in between java code in methods?
You can create Groovy classes much like you can create Java classes. Groovy and Java both get compiled down to JVM bytecode, so you can call Groovy classes from your Java classes and vice versa.
On mixing Java and Groovy syntax in the same class file: you cannot put Groovy style code in the middle of a Java class. You can, however, put nearly any Java style code in the middle of a Groovy class.
A lot of the benefits of Groovy syntax are similar to what you can get from other JVM languages like JRuby.
I recommend downloading Groovy and playing around with the GroovyConsole using a few small tutorials. If you're already familiar with Swing in Java, you might especially have fun following some SwingBuilder Groovy tutorials.