Guava Ints max() 函数
Guava的 Ints .max() 返回数组中存在的 greatest 值。
语法
参数: 该方法以 array 为参数,是一个非空的int值数组。
返回值: 该方法返回数组中大于或等于数组中所有其他值的值。
异常情况: 如果数组为空,该方法会抛出IllegalArgumentException。
下面的例子说明了Ints.max()方法。
示例1:
输出:
示例2: 为了证明IllegalArgumentException
输出:
参考: https://google.github.io/guava/releases/22.0/api/docs/com/google/common/primitives/Ints.html#max-int…-