0001 /* 0002 * TreeMap 0003 */ 0004 import java.util.*; 0005 0006 public class TestTreeMap { 0007 public static void main(String[] args) { 0008 TreeMap scarborough = new TreeMap(); 0009 scarborough.put("P", color=#FF00FF>"parsley"); 0010 scarborough.put("S", color=#FF00FF>"sage"); 0011 scarborough.put("R", color=#FF00FF>"rosemary"); 0012 scarborough.put("T", color=#FF00FF>"thyme"); 0013 System.out.println(scarborough); // {P = parsley, R = rosemary, S = sage, T = thyme} 0014 } 0015 }