当我在控制台(groovy 2.1.3)中运行以下代码时:
strings = [ "butter", "bread", "dragon", "table" ]
strings.eachParallel{println "$it0"}
我收到了:
groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.eachParallel() is applicable for argument types: (ConsoleScript40$_run_closure1) values: [ConsoleScript40$_run_closure1@a826f5]
有人能告诉我哪里做错了吗?