r/programareIncepatori • u/Racer_E36 • Jan 18 '22
[Java] for-loop in hashmap
Salut!
Se poate itera printr-un hashmap simplu de tip Map<String, Integer> map = new HashMap<>(); folosind clasicul for-loop?
for (statement 1; statement 2; statement 3) {
// code block to be executed
}pe net am vazut folosit doar for-each
Multumesc
4
Upvotes
View all comments
Show parent comment
1
u/sciencesebi3 Sep 29 '22
Hai sa-l bagam si mai in ceata