MCPcopy Create free account
hub / github.com/ReadyTalk/avian / randomUUID

Method randomUUID

classpath/java/util/UUID.java:20–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 }
19
20 public static UUID randomUUID() {
21 byte[] array = new byte[16];
22
23 new Random().nextBytes(array);
24
25 array[6] &= 0x0f;
26 array[6] |= 0x40;
27 array[8] &= 0x3f;
28 array[8] |= 0x80;
29
30 return new UUID(array);
31 }
32
33 public String toString() {
34 StringBuilder sb = new StringBuilder();

Callers

nothing calls this directly

Calls 1

nextBytesMethod · 0.80

Tested by

no test coverage detected