-7

i have this hash map :

  HashMap<String, String> meMap = new HashMap<String, String>();
                        meMap.put(p.getName(), selState);

how can i iterate it into another method?How can i pass map to another method to iterate it?

markella
  • 21
  • 2
  • 7

1 Answers1

0

meMap.entrySet() gives you that ability

You can use it like for (Entry<String, String> entry : meMap.entrySet()) {...} or pass to another method

Dmytro Rostopira
  • 10,588
  • 4
  • 64
  • 86