import java.util.*;
public class Example {
public static void main(String[] args) {
Hashtable<Integer, String> ht= new Hashtable<Integer, String>();
ht.put(4, "java");
ht.put(1, "c++");
ht.put(5, "php");
ht.put(3, "python");
ht.put(2, "c#");
Set set = ht.entrySet();
Iterator it = set.iterator();
while(it.hasNext()) {
Map.Entry me = (Map.Entry)it.next();
System.out.println(me.getKey() + ": " + me.getValue());
}
}
}
/*
run:
5: php
4: java
3: python
2: c#
1: c++
*/