Import Java.util.UUID;
/**
* UUID is a universal unique identifier, which is a standard * uuid for software construction
is a very good choice for database table primary key, ensuring that each generated UUID is the only
*
*uuid Composition: The current date and time; the clock sequence; Globally unique IEEE machine identification number;
* Standard UUID format is: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12)
*
*java UUID generator:
* Java uuid Generator (JUG): Open source UUID Generator, LGPL protocol, support MAC address.
*uuid: Special License, has the source code.
*java 5 version of the UUID generator: it seems that only the UUID of version 3/4 can be generated.
* In addition, there is also a UUID generator in hibernate, but the generated is not any (canonical) version of the UUID and is strongly not recommended for use.
*
/public class Test1 {public
static void Main (string[] args) {while
(true) {
System.out.println (Uuid.randomuuid ());}}