Iterate Map - Dump Map


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Iterator it = mp.entrySet().iterator();
  2. while (it.hasNext()) {
  3. Map.Entry pairs = (Map.Entry)it.next();
  4. System.out.println(pairs.getKey() + " = " + pairs.getValue());

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.