XmlGrid Users Forum
2013-07-09 10:46:31
Map is a very useful java container to store data of key/value pairs. In this example you will see how to create and populate a map. 


public void MapExample()
{
Map<String,String> map=new HashMap<String, String>();
map.put("key1", "value 1");
map.put("key2", "value 2");
map.put("key3", "value 3");
String s;
s=map.get("key2");
}

;3515;2013-07-09 10:46:31__s__
Map is a very useful java container to store data of key/value pairs. In this example you will see how to create and populate a map. 


public void MapExample()
{
Map<String,String> map=new HashMap<String, String>();
map.put("key1", "value 1");
map.put("key2", "value 2");
map.put("key3", "value 3");
String s;
s=map.get("key2");
}

__s__~u=Zac~site=NULL__s__Java Example create and populate Map__s____m__

Best view with Google Chrome