HashMap with Entryset Example

package cool;

import java.util.HashMap;
import java.util.Map;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public class hashmap {

	 * @param args
	public static void main(String[] args) {
		HashMap<String, String> myMap = new HashMap<String, String>();
		myMap.put("ind", "india");
		myMap.put("tn", "tamilnadu");
	    Set<Entry<String,String>> set = myMap.entrySet();

	    for (Map.Entry<String, String> me : set) {




988 total views, 1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.