Java UUID Create genRandomString(int len)

Here you can find the source of genRandomString(int len)

Description

gen Random String

License

Apache License

Declaration

public static String genRandomString(int len) 

Method Source Code

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

import java.util.UUID;

public class Main {
    public static String genRandomString() {
        return genRandomString(6);
    }/*from  ww  w. j  av a 2 s .co m*/

    public static String genRandomString(int len) {
        return UUID.randomUUID().toString().replaceAll("-", "").toUpperCase().substring(0, len);
    }
}

Related

  1. generatorTransactionPath(String namespace)
  2. genMonUUID(String prefix)
  3. genMsgId()
  4. genOntologyNS(String base)
  5. genRandom(int length)
  6. get36UUID()
  7. getUUID()
  8. getUUID()
  9. getUUID(String id)