For addition of elements to Map, use put() method. This process is explained by the given code.
Java Code: This is the code to explain map add operation
Map mapA = new HashMap();
mapA.put("key1", "element 1");
mapA.put("key2", "element 2");
mapA.put("key3", "element 3");
Key values are mapped by calling 3 put() methods, in the code given above. Both values & keys are String, in above code. To get value, use this code.
Java Code: This is the code to explain map access operation
String
...
sorry for all the questions
thanks...
06-14-2013, 02:22 PM in gbonecapone