import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
class TreeMapDemo {
public static void main(String args[]) {
TreeMap tm = new TreeMap();
tm.put("A", new Double(3.34));
tm.put("B", new Double(1.22));
tm.put("C", new Double(1.00));
tm.put("D", new Double(9.22));
tm.put("E", new Double(-1.08));
Set> set = tm.entrySet();
for (Map.Entry me : set) {
System.out.print(me.getKey() + ": ");
System.out.println(me.getValue());
}
double balance = tm.get("A");
tm.put("B", balance + 1000);
System.out.println(tm.get("A"));
}
}