local emptyArray = _objectWrappers:wrap(_arrays:arrayOf(_plugins:loadClass("java.lang.Integer"))) -- 查找数组中的最大值,如果数组为空,则返回 nil local maxValueOrNull = emptyArray:maxOfOrNull(function(it) return it end) -- 输出:最大值(或 nil): nil _console:log("最大值(或 nil): ", maxValueOrNull)