Is a set's “toArray” deterministic?
问题 Obviously, sets do not have any kind of ordering, so I cannot expect any specific ordering if I do String[] string = mySet.toArray(); However, I am faced with a use case where I don't care what ordering the string array is in, but I DO need it to be the case that if two sets are equal to each other, then: StringUtils.join(mySet.toArray(),','); will produce the same exact string for those sets, always, no matter how many times I run the program assuming I stick with the same code. Do I have