how to generate guid in java code example Example: java how to generate guid String guid = java.util.UUID.randomUUID().toString();