Languages

How to iterate over map in java?

4 points
Asked by:
Root-ssh
104970

I have simple java HashMap from java.util package.

eg:

Map<String, Integer> map = new HashMap<>();
map.put("A", 1);
map.put("B", 2);
map.put("C", 3);

What is the best way I can iterate over all keys and values?

0 answers
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join