Lecture 16
7
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
[ 0
th
item toString, 1
st
item toString ]
Very useful for debugging
Repeat slide from last lecture. Discussed then. Dont spend time on it now unless there are questions.