1+1 is just a convenient way of writing 1.plus(1). This is achieved by class
We haven’t used any explicit static typing in the way that you’re familiar with in Java. We assigned strings and numbers to variables and didn’t care about the type. Besides this, Groovy implicitly assumes these variables to be of static type java.lang.Object.
Installation The only prerequisite for installing Groovy is that you must first have a 1.4 or 1.5 or 1.6 JDK installed (available free from http://java.sun.com/j2se/) and the JAVA_HOME environment variable set to the location of your JDK installation.
We have used Groovy in direct mode. In this part, there is another way of using Groovy is to compile it to Java byte code and running it as regular Java application code within a Java Virtual Machine (JVM). This is called precompiled mode. Both ways execute Groovy inside a JVM eventually, and both ways… Continue reading