How do I create a unique ID in Java? [duplicate]

Create a UUID.

String uniqueID = UUID.randomUUID().toString();

Leave a Comment