K
Kamran Shafi
Hi,
I am creating an arraylist (say masterArrayList) of hashtables, where
each hashtable (say table) is of the format key=string, value =
arraylist of strings (say existing_strings). In a foreach loop I
retreive the corresponding hashtable from the masterArrayList and add
new strings to existing_strings after comparing the hashtable keys.
The problem is that when I add a new value to an existing_strings
arraylist it also add the new value to all other hashtables in the
masterArrayList.
Any idea what could be wrong?
I am creating an arraylist (say masterArrayList) of hashtables, where
each hashtable (say table) is of the format key=string, value =
arraylist of strings (say existing_strings). In a foreach loop I
retreive the corresponding hashtable from the masterArrayList and add
new strings to existing_strings after comparing the hashtable keys.
The problem is that when I add a new value to an existing_strings
arraylist it also add the new value to all other hashtables in the
masterArrayList.
Any idea what could be wrong?