Preliminary understanding of UUID

Source: Internet
Author: User
Tags uuid
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 ());}}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.