I need to generate 10,000 unique identifiers in Java. The identifiers should be a mixture of numbers and letters and less than 10 characters each. Any ideas? Built in librar
The easiest and fastest way is to generate permutations of a certain string. As long as the string is long enough, you can easily have 10,000 unique permutations. The good thing of generating permutation is that you don't have to worry about duplications. If a string contains all different characters, it can generate n! permutations (n is the length of the string). So a string with 8 different characters can generate 40,320 different permutations.
There are many code on-line to generate permutations of a string, such as this one http://introcs.cs.princeton.edu/23recursion/Permutations.java.html.
If you want them to be more random, you can use different strings as the seed, such as "abcde123", "efgh456", etc..