java.util.UUID
class. This class was introduced in JDK 1.5. The UUID.randomUUID()
method return a UUID object. To obtain the value of the random string generated we need to call the UUID.toString()
method.version()
method and variant()
method respectively. Let’s see the code snippet below: