java class generate unique id code example Example: java unique id String uuid = UUID.randomUUID().toString();