Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
Nov. 22, 2014, 3:45 p.m.
FORMAT:
Java
SIZE:
337 Bytes
Raw
Download
Tweet
HITS:
1058
Go to comments
Report
Collection
<
Integer
>
key1
=
accounts
.
keySet
();
//accounts = A hashmap with integer,integer
Iterator
<
Integer
>
iter
=
key1
.
iterator
();
//Create the iterator
while
(
iter
.
hasNext
())
//Check if there is more to go to
{
iter
.
next
();
//This is the object you get from the iterator, it also advances the iterator by one
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus