Storing name value pairs
1 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Wednesday, April 30, 2003 06:05 AM

Hi all,

I'm looking for a way to store a set of name value pairs. Both the name and value are created at runtime.

What happens is the program reads a file and the file contains a list of variable names. It then asks the user to enter values for these variables. Then later I want it to go through a document replacing every occurance of the variable name with the variable value entered by the user.


Re: Storing name value pairs

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, April 30, 2003 06:44 AM

Either "java.util.Map themap = new java.util.HashMap()", or "java.util.Map themap = new java.util.TreeMap()", depending on if you want the entries sorted by the key (name), when you iterate them.

About | Sitemap | Contact