Reputation: 244
Is there any dynamic array type variable in grails? At the moment I am just reverting to java and using a Vector but I want to try and keep the code as close to grails as possible.
Upvotes: 0
Views: 76
Reputation: 9162
Try something like this:
def dynamicArray = []
dynamicArray << anyObject
Technically if will not be an array, but a List
of some sort, but it will give you a feel of array. More info is available in the javadocs here
Upvotes: 1