How to create a UUID in bash?

In Java it is possible to create a random UUID: UUID uuid = UUID.randomUUID(); How to do this in Bash?