April 05
Prde. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Exemplo Map
nTabela de frequencia de palavras
npublic class Freq {
n  private static final Integer ONE = new Integer(1);
n  public static void main(String args[]) {
n     Map<String, Integer> m = new HashMap<String, Integer>();
n     // Initialize frequency table from command line
n       for (int i=0; i < args.length; i++) {
n        Integer freq = (Integer)m.get(args[i]);
n        m.put(args[i], (freq==null ? ONE : new Integer(freq.intValue() + 1)));
n      }
n      System.out.println(m.size()+ " palavras distintas encontradas:");
n      System.out.println(m);
n   }
n}
target =
"_self" - show in the current frame
"_parent" - show in the parent frame
"_top" - show in the topmost frame
"_blank" - show in a new unnamed top-level window
name - show in a new top-level window named name