How do I create a unique ID in Java? [duplicate] October 15, 2022 by Tarik Create a UUID. String uniqueID = UUID.randomUUID().toString();