Creating HashMap from map
807601May 4 2008 — edited May 5 2008Hello, I am learning as much as I can about HashMaps and I understand most of it apart from this:
To create HashMap from map use following constructor
HashMap HashMap = new HashMap(Map myMap);
Could someone please explain to me what is happening here as I'm slightly confused. Is it copying a "collection" from a Map Type (TreeMap, SortedMap, LinkedHashMap, Hashtable.. etc.)? Sorry if it sounds like a simple question but I have no experience with Maps.
Also is it possible to create multi-dimensional HashMaps? If so, how would I declare/initialize one.
Thanks