Random UUID
In this chapter you will learn:
Get a Random UUID
UUID represents an immutable universally unique identifier (UUID). A UUID has a 128-bit value.
The following Java uses the java.util.UUID
to generate
a random immutable universally unique identifier.
import java.util.UUID;
//j av a 2 s. com
public class Main {
public static void main(String arg[]) {
System.out.println(UUID.randomUUID());
}
}
Output:
Next chapter...
What you will learn in the next chapter:
Home » Java Tutorial » Utility Classes