diff --git a/classpath/java/util/ArrayList.java b/classpath/java/util/ArrayList.java index abb5ea28cc..e2bbfeea2f 100644 --- a/classpath/java/util/ArrayList.java +++ b/classpath/java/util/ArrayList.java @@ -174,4 +174,8 @@ public class ArrayList implements List { public ListIterator listIterator(int index) { return new Collections.ArrayListIterator(this, index); } + + public String toString() { + return Collections.toString(this); + } } diff --git a/classpath/java/util/LinkedList.java b/classpath/java/util/LinkedList.java index 48d27ff97a..a78c42fa24 100644 --- a/classpath/java/util/LinkedList.java +++ b/classpath/java/util/LinkedList.java @@ -196,6 +196,10 @@ public class LinkedList implements List { return new MyIterator(front); } + public String toString() { + return Collections.toString(this); + } + private static class Cell { public T value; public Cell prev;