Groovy uses a Java-like syntax which is dynamically compiled to Java byte code therefore Groovy can seamlessly work together with Java code and Java libraries. Groovy with Java make Groovy very powerful. When an application needs functionality that can’t be achieved with the existing Groovy libraries, the developer can still write Java code to achieve the goal and vice versa Java code can be converted to Groovy
Figure 1: Groovy on Java Platform
Groovy is like a super version of Java. It can leverage Java’s enterprise capabilities but also has cool productivity features like action, builders and dynamic typing.