foreach statement. There are, of course, other methods using iterator and entrySet, but who needs them when you have this://HashMap<Key, Value> map = new HashMap<Key, Value>();
for (Key key : map.keySet()) {
Value value = map.get(key);
}
Place to jot down some thoughts, ideas, tips, howtos and java snippets.
foreach statement. There are, of course, other methods using iterator and entrySet, but who needs them when you have this://HashMap<Key, Value> map = new HashMap<Key, Value>();
for (Key key : map.keySet()) {
Value value = map.get(key);
}
No comments:
Post a Comment