Generate Random UUID in Java In this Java core tutorial, we learn how to use java.util.UUID class in Java to generate a random universally unique identifier (UUID).