The Map Interface (The Java™ Tutorials > Collections > Interfaces)
import java.util.*; public class Freq { public static void main(String[] args) { Map m = new HashMap(); // Initialize frequency table from command line for (String a : args) { Integer freq = m.get(a); m.put ......