Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.



411 University St, Seattle, USA


+1 -800-456-478-23


Groovy Hello World program

Consider we want to print a simple string “Hello World” in Java. The code to achieve the string Groovy hello world would be:

public class Demo {
    public static void main(String[] args) {
        System.out.println("Hello World");

The above code is valid in both Java and Groovy as Groovy is a superset of Java. But the advantage with Groovy is that we can do away with class creation, public method creation, etc and achieve the same output with a single line code as follows:

println "Hello World."



Leave a comment

Your email address will not be published. Required fields are marked *