generate a unique random integer java code example Example: java random unique number String id = UUID.randomUUID().toString();