I need to read in a Properties object from a file, however I need to switch the key and value pairs around, i.e. I need the keys to become the property values and vice-versa. I also cannot just change this on the file I am reading in. Any ideas how I could do this?
Thanks
You can create a second
Propertiesobject, iterate over the entires you have just read, callingput(entry.getValue(), entry.getKey())and you have it.