groovy array add element code example Example: groovy add array to array def a = [1, 2, 3] def b = [4, 5, 6] a << b println a [1, 2, 3, [4, 5, 6]]