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