# Uses of Class
java.util.UUID

Packages that use UUID
Package
Description
java.util
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.

## Uses of UUID in java.util

Classes in java.util that implement interfaces with type arguments of type UUID
Modifier and Type
Class
Description
`final class`
`UUID`
A class that represents an immutable universally unique identifier (UUID).
Methods in java.util that return UUID
Modifier and Type
Method
Description
`static UUID`
UUID.`fromString(String name)`
Creates a `UUID` from the string standard representation as described in the `UUID.toString()` method.
`static UUID`
UUID.`nameUUIDFromBytes(byte[] name)`
Static factory to retrieve a type 3 (name based) `UUID` based on the specified byte array.
`static UUID`
UUID.`randomUUID()`
Static factory to retrieve a type 4 (pseudo randomly generated) UUID.
Methods in java.util with parameters of type UUID
Modifier and Type
Method
Description
`int`
UUID.`compareTo(UUID val)`
Compares this UUID with the specified UUID.