java.util.UUID.randomUUID().toString() length
Does java.util.UUID.randomUUID().toString() length always equal to 36? Yes!! it is. A UUID actually a 128 bit value (2 long). To represent 128 bit into hex string there will be 128/4=32 char (each char is 4bit long). In string format it also contains 4 (-) that’s why the length is 36. Example: 54947df8-0e9e-4471-a2f9-9af509fb5889 32 hex char … Read more