Java Code:
import java.util.Map;
import java.util.TreeMap;

public class Freq {
  private static final Integer ONE = new Integer(1);

  public static void main(String args[]) {
    Map m = new TreeMap();

    m.put("a Key", "a Value");
    m.put("java-forums", "www.java-forums.org");

    System.out.println(m.size() + " keys detected:");
    System.out.println(m);
  }
}