public class SortHashtable {
    public static void main(String[] args) {
    // Create and populate hashtable
        Hashtable ht = new Hashtable();
        ht.put("ABC", "abc");
        ht.put("XYZ", "xyz");
        ht.put("MNO", "mno");

        // Sort hashtable.
        Vector v = new Vector(ht.keySet());
        Collections.sort(v);

        // Display (sorted) hashtable.
        for (Enumeration e = v.elements(); e.hasMoreElements();) {
             String key = (String)e.nextElement();
             String val = (String)ht.get(key);
             System.out.println("Key: " + key + " Val: " + val);
        }
     }
}

이런것은 찾으려 들면 찾기 어렵습니다.
1 ··· 250 251 252 253 254 255 256 

글 보관함

카운터

Total : / Today : / Yesterday :
get rsstistory!