java - Adding hashmap keys to my arraylist -


i have arraylist <string> , hashmap<string, object> , i'm trying add keys arraylist. iterating through, add key in arraylist.

my code:

for (string key: hmap.keyset())  {     string l = ("key: " + key + "\n");     if(!array.contains(l))     array.add(l); } 


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -