Java: Randomly generate distinct names

前端 未结 8 726
臣服心动
臣服心动 2020-12-09 04:58

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

8条回答
  •  隐瞒了意图╮
    2020-12-09 05:30

    Why not use java.util.UUID? It is guaranteed to generate unique identifiers, and it is as standard as it gets :-).

提交回复
热议问题