I have a  HashMap   with some data .I must alter  the Map by replacing the 
keys with their upper case.
       
         Map searchResultMap=           
(Map)request.getAttribute("searchResults");
         ListIterator   
searchResultMapIte=Arrays.asList(searchResultMap.keySet().toArray()).listIterator();
         while(searchResultMapIte.hasNext()){
                  Object  aKey=searchResultMapIte.next();
                  aKey=aKey.toString().toUpperCase();
                  searchResultMapIte.set(aKey);
         }          
      I was  trying to achieve this using ListIterator which provides set 
method .But after  the while loop when I print the 
      Map it is  the same Map without any change .My question is how can I   
alter   a java.util.Map while I am iterating it.
      Thanks  & Regards
    
                
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Reply via email to