Original Post
Greets folks,
I''ve got a problem. Now I know that java is pointers but I''m at a loss here.
I have a class called mapfile that contains all the info I need for a map. I tried using a hashtable so I would have
htMapFile.put(key, mapfile);
then I would change the contents of mapfile and repeat the above process... I was hoping that it wouldn''t do what it did.
htMapFile key 1 --> points to mapfile
change mapfile contents
htMapFile key 2 --> changed mapfile
but
htMapFile key 1 --> also points to changed mapfile
hence the joy of pointers
is there a way to perhaps clone mapfile so when it dumps the info into the hashtable i can have in key 1 different data than key 2?
There has to be a way to work around it... somehow
Help/Suggestions would be appreciated
Smoo