how to create an array in groovy code example
Example 1: array in groovy
def birdArr = ["Parrot", "Cockatiel", "Pigeon"] as String[]
Example 2: 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]]
def birdArr = ["Parrot", "Cockatiel", "Pigeon"] as String[]
def a = [1, 2, 3]
def b = [4, 5, 6]
a << b
println a
[1, 2, 3, [4, 5, 6]]