Search code examples
javarandomuuidguid

Create a GUID / UUID in Java


What are some of the best ways to create a GUID / UUID in Java?


Solution

  • Have a look at the UUID class bundled with Java 5 and later.

    For example: