java - How to efficiently iterate over each Entry in a Map? -
if have object implementing map
interface in java , wish iterate on every pair contained within it, efficient way of going through map?
will ordering of elements depend on specific map implementation have interface?
map<string, string> map = ... (map.entry<string, string> entry : map.entryset()) { system.out.println(entry.getkey() + "/" + entry.getvalue()); }
Comments
Post a Comment