Sorting a map by date key in Java

后端 未结 2 446
夕颜
夕颜 2021-01-27 07:11

I\'m trying to sort a map in java by date key using TreeMap. Here\'s my code

public static void sort() {

    BufferedReader br;
    String line;
    String[] da         


        
2条回答
  •  孤街浪徒
    2021-01-27 07:47

    See http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html.

    Use y for year, M for month in year, and d for day in month. Specifically, lowercase m is minute in hour, while uppercase M is month in year.

提交回复
热议问题