wrap($arrays->arrayOf($plugins->loadClass("java.lang.Long"))); // 查找数组中的最大值,如果数组为空,则返回 null $maxValueOrNull = $emptyArray->maxOfOrNull(function ($it) { return $it; }); // 输出:最大值(或 null): null $console->log("最大值(或 null): ", $maxValueOrNull);