how to generate random number in java using uuid code example Example: java random uuid String id = UUID.randomUUID().toString();