Storing Data in Hashmap and getting the same !!!
1 posts in topic
Flat View  Flat View

Posted By:   karthik_kumar
Posted On:   Wednesday, August 1, 2001 08:25 AM

I have got a strange doubt..Please tell me if i can do this ..

Suppose I have a program called get.java which get the data from user and stores it in HashMap .This Prgm is running in one command Prompt.
And I have another Program called show.java in another command Prompt which will get the Data from HashMap and Display it..

My Question is Can the Prgm show.java get the Values from the HashMap which is stored by get.java ????

I hope iam Clear with the Question ..
Please let me know if this is Possible ...

Thanks in Advance ..

Re: Storing Data in Hashmap and getting the same !!!

Posted By:   AlessandroA_Garbagnati  
Posted On:   Wednesday, August 1, 2001 08:36 AM


If you execute the two commands from the command line, that means that you are using two different Virtual Machine and, therefore, you can't share information.

What you can do, eventually, is having the get.java storing data in a hashtable and then serialize it on the disk, and having show.java reading the serialized hashtable and display the value to the user.

Maybe there are other solution, but I think this is the easiest.
About | Sitemap | Contact