def numbers = $objectWrappers.wrap($arrays.arrayOf($plugins.loadClass("java.lang.Integer"), 10, 20, 30, 5, 15)) // 查找数组中的最大值 def maxValue = numbers.maxOf { it } // 输出:最大值: 30 $console.log("最大值: ", maxValue)