I have worked in soap message, and to parse the value from Webservice, the values are stored in ArrayList.
Example: values are Employee name (Siva) and Employee id (3433fd), these two values are stored in arraylist, but I want to stored in Dictionary, How?
Main Difference is:NSMutableDictionary is derived from NSDictionary, it has all the methods of NSDictionary. NSMutableDictionary is mutable( can be modified) but NSDictionary is immutable (can not be modified).
In Java, Dictionary is the list of key-value pairs. We can store, retrieve, remove, get, and put values in the dictionary by using the Java Dictionary class.
you can use HashMap like this
Map <String,String> map = new HashMap<String,String>(); //add items map.put("3433fd","Siva"); //get items String employeeName =(String) map.get("3433fd");
You can use Bundle.
as it offers String to various types of Mapping.
Bundle b = new Bundle(); b.putInt("identifier", 121); b.putString("identifier", "Any String"); b.putStringArray("identifier", stringArray); int i = b.getInt("identifier"); ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With