def numbers1 = $objectWrappers.wrap($arrays.arrayOf($plugins.loadClass("java.lang.Integer"), 1, 2, 3, 4, 5)) def numbers2 = $arrays.arrayOf($plugins.loadClass("java.lang.Integer"), 3, 4, 5, 6, 7) // 查找两个数组的交集,两个数组的交集: [3, 4, 5] numbers1.intersect($arrays.toList(numbers2)).forEach { $console.log(it) }