The key is to use TreeMap or convert the HashMap to TreeMap as done below.
Map<String, String> map = new HashMap<String, String>(); Map<String, String> treeMap = new TreeMap<String, String>(map);
No comments:
Post a Comment