Groovy 3 adds several new features similar to equivalents in Java, including the enhanced for loop, try-with-resources and lambda expressions.