标签:size 实例 system ring pre ash rev sys reverse
public static void main( String[] args ) { Set<String> set = new HashSet<>(); set.add("20180102"); set.add("20180101"); set.add("20180103"); set.add("20180104"); set.add("20180105"); set.add("20180102"); set.stream().sorted(Comparator.reverseOrder()); System.out.println(set.toString()); List<String> list=new ArrayList<>(set); String newKey=list.get(list.size()-1); System.out.println(newKey); }
标签:size 实例 system ring pre ash rev sys reverse
原文地址:https://www.cnblogs.com/hzcjd/p/13355171.html