java unique id

Java
String uuid = UUID.randomUUID().toString();
Source

Also in Java: