When I try to run the following code I get an error:
++++++++++++++++++++++++++++++++++++
groovy:000> 1st = [1, 2, 3]
++++++++++++++++++++++++++++++++++++
This is the error that I get:
ERROR groovy.lang.MissingMethodException:
No signature of method: java.lang.Integer.call() is applicable for argument types: (java.util.ArrayList) values: [[1, 2, 3]]
Possible solutions: wait(), any(), abs(), wait(long), any(groovy.lang.Closure), and(java.lang.Number)
at groovysh_evaluate.run (groovysh_evaluate:2)
Any ideas what the problem may be??
ironmantis7x
Variables can’t begin with a digit. Changing 1st to first is enough to make everything work as expected: