I'm saving several values in a properties file, yet whenever I open the file, the values are not written in the order that I coded.
save.setProperty("SN", "foo");
save.setProperty("ID", "bar");
save.setProperty("TN", "example");
save.setProperty("TC", "generic");
save.setProperty("SW", "incorrect");
save.setProperty("NW", "order");
save.store(new FileOutputStream(file.getAbsolutePath(), null);
This is how the file looks when I open it:
#Sat Jul 13 19:28:59 EDT 2013
ID=bar
SW=incorrect
TC=generic
TN=example
NW=order
SN=foo
As you can see, the order is completely off from the coding. I am curious as to why this happens. It is obviously not sorted alphabetically, and I can't see any other reason why it should happen like this.