We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2aa4a commit d5211ecCopy full SHA for d5211ec
1 file changed
TestListIterator.java
@@ -16,6 +16,9 @@ public static void main(String[] args) {
16
}
17
18
System.out.println("\nTraversing the list in backward direction:");
19
+ //If without previous iteration, we should create iter like this:
20
+ //iter = l1.listIterator(l1.size()), so that iter points to the position
21
+ //right after the last element.
22
while (iter.hasPrevious()){
23
System.out.println(iter.previousIndex() + ": " + iter.previous());
24
0 commit comments