Thread: ArrayLists
View Single Post
Old Nov 13th, 2006, 2:21 PM   #12
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
If you want to iterate through the set of double values assigned to a particular letter in the map, you can do the following:

for (double i : map.get('A')) {
      System.out.println(i);
}

If instead you want to iterate through the first double value assigned to each letter value in the map:

for (char i : map.keySet()) {
      System.out.println(map.get(i)[0]);
}
titaniumdecoy is offline   Reply With Quote