@Test public void constructor_toString_returnsEmptyList() throws Exception { Assert.assertEquals("[]", test.toString()); }
@Override public String toString() { String out = "["; if (head != null) { out += head.elem; Entry tmp = head.next; while (tmp != null) { out = out + "," + tmp.elem; tmp = tmp.next; } } out += "]"; return out; }
HeadList { @Override public String toString() { String out = "["; if (head != null) { out += head.elem; Entry tmp = head.next; while (tmp != null) { out = out + "," + tmp.elem; tmp = tmp.next; } } out += "]"; return out; } }
HeadList { @Override public String toString() { String out = "["; if (head != null) { out += head.elem; Entry tmp = head.next; while (tmp != null) { out = out + "," + tmp.elem; tmp = tmp.next; } } out += "]"; return out; } HeadList(); }
HeadList { @Override public String toString() { String out = "["; if (head != null) { out += head.elem; Entry tmp = head.next; while (tmp != null) { out = out + "," + tmp.elem; tmp = tmp.next; } } out += "]"; return out; } HeadList(); void add(int info); int remove(int index); void reverse(); @Override String toString(); static void main(String[] args); }
HeadList { @Override public String toString() { String out = "["; if (head != null) { out += head.elem; Entry tmp = head.next; while (tmp != null) { out = out + "," + tmp.elem; tmp = tmp.next; } } out += "]"; return out; } HeadList(); void add(int info); int remove(int index); void reverse(); @Override String toString(); static void main(String[] args);  }