I am doing an application which needs dynamic creation of Hash Maps.
Map<K,V> parent=new Hash Map<K,V>();
parent = Map<K,Map<K,V>>();
I need only 3 levels Like this
parent = Map<K,Map<K,Map<K,V>>>();
Edited 17-Jan-13 2:22am
What exactly do you want to acchive?
This is a 3 dimensional HashMap. Where should that be needed?
You need to be very careful with the Keys and the values - do not mix them up.
But I think there must be a simpler solution.
How about creating an Object that holds the HashMap of 2. and 3. Dimension?
Could be at least less confusing.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)