Tuesday, November 29, 2011

I have a String name & Map m, in my bean class. I have get & set methods on both.

If you have key with you then :map.get(key) gives you the value of the key in the map.or Map displayMap // lets say you have displayMap as a Map variableSet entrySet = displayMap.entrySet(); for(Iterator iter = entrySet.iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry)iter.next(); String key =(String)entry.getValue(); String value = (String)displayMap.get( entry.getKey()); }
Category:JSP Interview Questions

No comments:

Post a Comment