SHARE
TWEET

Simple hexadecimal UUID generator.

Nickster258 Mar 19th, 2017 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Random myRandom = new Random();
  2.  
  3. public String getUUID(int length){
  4.     String UUID = "";
  5.     for (int i = 0; i<length; i++) {
  6.         int thisRandom = myRandom.nextInt(16);
  7.         UUID += Integer.toHexString(thisRandom);
  8.     }
  9.     return UUID;
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top