Alex Mawashi Alex Mawashi - 1 month ago 16
Groovy Question

Java vs Groovy programming language

I was studing the Spring Boot as a tool to implement Spring Web App in a faster way and I noticed that it is primaly explained through Spring Boot CLI which is a command line tool to execute groovy scripts.

My question is:

1) What are, in short, the main differences between the Java and the Groovy programming languages?

2) Could Groovy (if we consider it as an evolution of Java) substitute it in all the contexts?

Answer

What are, in short, the main differences between the Java and the Groovy programming languages?

Please check this link for differences with java. Although some of the advantages groovy provides is also now available with latest version of java ie. Lambda Expression.

Could Groovy (if we consider it as an evolution of Java) substitute it in all the contexts?

Groovy is a superset of Java, which means a Java program will run fine in Groovy environment, but vice-versa may or may not run, depending upon whether it’s written in groovy or Java.