Created
January 20, 2021 06:20
-
-
Save anjanashankar9/b85e1e11daec83128a33c6fad68a9253 to your computer and use it in GitHub Desktop.
For Loop - List Iterator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListIterator<Integer> litr = numbers.listIterator(); | |
while(litr.hasNext()) { | |
int i = litr.next(); | |
System.out.print(i+ " "); | |
} | |
while (litr.hasPrevious()) { | |
int i= litr.previous(); | |
System.out.print(i+ " "); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment