// Hunter Schafer, CSE 143 // Sample program that demonstrates map // import java.util.*; public class MapExample { public static void main(String[] args) { Map map = new TreeMap(); map.put("Hunter", 3); // map["Hunter"] = 3; map.put("Andrew", 2); System.out.println(map.get("Hunter")); // map["Hunter"] map.put("Hunter", map.get("Hunter") + 1); System.out.println(map.get("Hunter")); // should be 1 more than before System.out.println(map); } }