A class that represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value. There exist different variants of these global identifiers.
import java.util.UUID;
public class UUIDExample
{
public static void main(String[] args)
{
UUID uuid=UUID.randomUUID(); //Generates random UUID
System.out.println(uuid);
}
}
Output
c6a8669e-ee95-4c42-9ef6-4a9b61380164