0 votes
in JAVA by
How to iterate a map in java?

1 Answer

0 votes
by

How to iterate a map in java?

for (Map.Entry<Integer, String> entry : hm.entrySet()) {

    Integer key = entry.getKey();

    String value = entry.getValue();

}

🔗Reference: stackoverflow.com

🔗Source: Java Interview Questions and Answers

Related questions

0 votes
asked Aug 4, 2023 in JAVA by DavidAnderson
0 votes
asked Aug 4, 2023 in JAVA by DavidAnderson
...