Lecture 15
16
toString for collections
•TreeMapDemo.java
–108 terminal.println(map.toString());
–produces output
–{one=1, three=3, two=1}
–“{ (key.toString()=value.toString(),   … }”
•ArrayList toString produces
–“[ 0th item toString, 1st item toString … ]”
•Very useful for debugging