I want to populate a HashMap using the Properties class. I want to load the entries in the .propeties file and then copy it into
HashMap
Properties
.propeties
If I understand correctly, each value in the properties is a String which represents an Integer. So the code would look like this:
for (String key : properties.stringPropertyNames()) { String value = properties.getProperty(key); mymap.put(key, Integer.valueOf(value)); }