how to generate unique id in java for users code example Example: java unique id String uuid = UUID.randomUUID().toString();