id as number or string java code example Example: java unique id String uuid = UUID.randomUUID().toString();