I have users as my hashmap . How would I be able to display each value String from my hashmap using its key? Sample key: "1", Sample value: "name: flower" "age: 6". Is there simpler way for to display flower and 6?
Iterator it = users.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.next();
Log.e(pair.getKey().toString(), " = " + pair.getValue());
it.remove(); // avoids a ConcurrentModificationException
}