Java: Export and Import a HashMap
<p>Just wondering, is there anyway in JAVA to export a hashmap?</p>

<p>I know you define one through: </p>

<p>HashMap hmap = new HashMap(); </p>

<p>And i have found examples of how you can grab or insert information to the hashmap, but i don't have any idea how to save the "hashmap", so that the data added during the program running once, could be accessed by the program added another time.</p>

<p>Basically, upon the program running, the user would add their name followed by an amount in the format UserName|Amount. 
And then you could close the program.
Next time you open the program you should be able to open the hashmap and get the amount tied to the User by using their UserName as a key. </p>

<p>This is the only way I've thought of doing it so far, but if there is a better way of doing it then please by all means, let me know :)</p>

<p>Thanks!</p>