Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 8, 2020 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/d48971829253658d66a75ff9aae27162 to your computer and use it in GitHub Desktop.
Save parzibyte/d48971829253658d66a75ff9aae27162 to your computer and use it in GitHub Desktop.
// Ahora ponemos varios elementos para imprimirlos
hashMap.put("A", 1);
hashMap.put("E", 12);
hashMap.put("I", 15);
hashMap.put("O", 0);
hashMap.put("U", 0);
for (HashMap.Entry<String, Integer> entry : hashMap.entrySet()) {
System.out.printf("Clave: %s. Valor: %d\n", entry.getKey(), entry.getValue());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment