Skip to content

Commit cb82110

Browse files
authored
format code
1 parent 0b8eb71 commit cb82110

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ch04/03_Nested_Classes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public class LinkedCollection<E> extends AbstractCollection<E> {
3030
return size;
3131
}
3232
public boolean add(E elt) {
33-
last.next = new Node(elt); last = last.next; size++;
33+
last.next = new Node(elt);
34+
last = last.next;
35+
size++;
3436
return true;
3537
}
3638
public Iterator<E> iterator() {
@@ -81,7 +83,9 @@ class LinkedCollection<E> extends AbstractCollection<E> {
8183
return size;
8284
}
8385
public boolean add(E elt) {
84-
last.next = new Node<E>(elt); last = last.next; size++;
86+
last.next = new Node<E>(elt);
87+
last = last.next;
88+
size++;
8589
return true;
8690
}
8791
private static class LinkedIterator<T> implements Iterator<T> {

0 commit comments

Comments
 (0)