fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import com.google.common.base.Charsets;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. byte[] bytes = "rabbid duck".getBytes(Charsets.UTF_8);
  10. System.out.println(java.util.UUID.nameUUIDFromBytes(bytes));
  11. Thread.sleep(500);
  12.  
  13. UUID u1 = UUID.nameUUIDFromBytes("rabbid duck".getBytes(Charsets.UTF_8));
  14. System.out.println(u1);
  15.  
  16. }
  17. }
  18.  
Success #stdin #stdout 0.1s 29488KB
stdin
Standard input is empty
stdout
9cc883a1-5aad-3cc4-b3bf-6731f30ae9da
9cc883a1-5aad-3cc4-b3bf-6731f30ae9da