fork(4) download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. Map<Integer, String> hm = new HashMap<>();
  9. hm.put(0, "zero");
  10. hm.put(1, "one");
  11.  
  12. for (Integer key : hm.keySet()) {
  13. System.out.println(key);
  14. System.out.println(hm.get(key));
  15. }
  16. }
  17. }
Success #stdin #stdout 0.07s 381248KB
stdin
Standard input is empty
stdout
0
zero
1
one