GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing raw.githubusercontent.com — raw.githubusercontent.com package com.hmkcode;
import java.util.HashMap;
import java.util.Map;
public class Test {
public static void main(String[] args){
Map map = new HashMap();
//*value Class should implements the Comparable interface
//*String implements Comparable by default.
map.put("Z", "3");
map.put("D", "4");
map.put("A", "1");
map.put("B", "2");
map.put("F", "6");
map.put("E", "5");
System.out.println("Unsorted Map: "+map);
System.out.println("Sorted Map By Values: "+MapSort.sortByValue(map));
System.out.println("Sorted Map By Keys: "+MapSort.sortByKey(map));
}
}
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |