Android UUID Create getNewUUID()

Here you can find the source of getNewUUID()

Description

Generates a variant 2, version 4 (randomly generated number) UUID as per RFC 4122.

License

Apache License

Return

UUID as a string

Declaration

public static String getNewUUID() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.UUID;

public class Main {
    /**//from   w  w w .j a v  a 2s.  c  om
     * Generates a variant 2, version 4 (randomly generated number) UUID as per RFC 4122.
     * @return UUID as a string
     */
    public static String getNewUUID() {
        return UUID.randomUUID().toString();
    }
}

Related

  1. getRandomUUID()
  2. createUUID()
  3. getUUID()
  4. UUID()
  5. generateUUID(String value)