Java UUID Create generate()

Here you can find the source of generate()

Description

generate

License

Apache License

Declaration

public static String generate() 

Method Source Code


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

import java.util.UUID;

public class Main {

    public static String generate() {
        String s = UUID.randomUUID().toString();
        return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23)
                + s.substring(24, 36);//from  ww w  .  j  av a2s .  c o  m
    }
}

Related

  1. generate()
  2. generate()
  3. generate()
  4. generateApiAccesskeyId()
  5. generateAppIds(int noOfAppIdsToGenerate)