原创

Java-Set专题-set排序

1、Set排序,取最大值,最小值
ImmutableSet<String> learningMonthList = ImmutableSet.of("2012-12","2011-13","2013-11");

TreeSet<String> treeSet = new TreeSet<>(learningMonthList);
System.out.println(treeSet.first());
System.out.println(treeSet.last());
正文到此结束
本文目录