java how to make a random ID code example
Example 1: java unique id
String uuid = UUID.randomUUID().toString();
Example 2: how to generate random id in java
import java.util.UUID;
public class UUIDExample.
{
public static void main(String[] args)
{
UUID uuid=UUID.randomUUID(); //Generates random UUID.
System.out.println(uuid);
}
}