I am new in Android app development. Now I am writing a singleton class for manipulating database operation. In case of select query, I am planning to store the “table field name” as key and data of each row in a dictionary. Then each dictionary of row data is stored in an Array. I have implemented this concept in iOS. But as I am new to Android, I don’t how the dictionary concept can be implemented in Android. Does this is available in Android? If so can anybody help me to implement.
Thanks in advance.
in ios may be
dictionaryis save data as key/pair valueand in android we have
HashMap<Key,Value>here
Integer is key and String is value//Add data in map
NOTE ::
Mind that
key is unique not allowed duplicatesandif you need ordered data then use LinkedHashmap instead of Hashmap//retrieve data