UUID is simply a 32-bit length string that never repeats, (but it is 36 bits in java, because it adds 4 '-'. So pay attention when setting the length in the database.)
The role of UUID is generally a unique identifier, which is mainly used as a unique primary key for the database.
Its use is very simple, the code is given below:
package ziyang; import java.util.UUID; public class Uuid { public static void main(String[] args) { String uuid = UUID.randomUUID().toString(); System.out.println(uuid); } }