Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Iterator<String> itr = list.iterator();
- String x;
- while(itr.hasNext()) {
- x = itr.next();
- itr.remove();
- //do something with x
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement