Java UUID Create generateUUID()

Here you can find the source of generateUUID()

Description

This method generates a unique ID (UUID - Universally unique identifier)

License

Open Source License

Return

UUID as String

Declaration

public static String generateUUID() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.UUID;

public class Main {
    /**// w  w w .  ja v  a  2s .  co m
     * This method generates a unique ID (UUID - Universally unique identifier)
     *
     * @return UUID as String
     */
    public static String generateUUID() {
        // Creating a random UUID (Universally unique identifier).
        UUID uuid = UUID.randomUUID();
        return uuid.toString();
    }
}

Related

  1. generateURN()
  2. generateUUID()
  3. generateUUID()
  4. generateUUID()
  5. generateUUID()
  6. generateUUID()
  7. generateUuid()
  8. generateUUID()
  9. generateUUID()