add print method to the Dict and List classes

This commit is contained in:
Ben Fry
2014-07-30 21:22:10 -04:00
parent 76dedb1d5b
commit 2943469482
6 changed files with 37 additions and 15 deletions

View File

@@ -428,6 +428,13 @@ public class StringDict {
}
public void print() {
for (int i = 0; i < size(); i++) {
System.out.println(keys[i] + " = " + values[i]);
}
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();