java中给集合快速取值最大值和最小值
public static void main(String[] args) { List list = new ArrayList(); list.add(new Double(123.23)); list.add(new Double(33.23)); list.add(new Double(13.23)); list.add(new Double(3.23)); System.out.println(getMaxDouble(list)); } public static double getMaxDouble(List list){ double max = Collections.max(list); double min = Collections.min(list); return max; }
https://blog.csdn.net/li1246994520/article/details/50834100/
您的资助是我最大的动力!
金额随意,欢迎来赏!