Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

keyset sort java


Map<String, Object> map = new TreeMap<String, Object>();
/* Add entries to the map in any order. */
...
/* Now, iterate over the map's contents, sorted by key. */
for (Map.Entry<String, ?> entry : map.entrySet()) {
  System.out.println(entry.getKey() + ": " + entry.getValue());
}

Source by devarama.com #
 
PREVIOUS NEXT
Tagged: #keyset #sort #java
ADD COMMENT
Topic
Name
3+5 =