A Java program to create a Randomly Generated UUID i.e. Version 4 UUID. Read blog at coderolls.com/create-uuid-in-java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.UUID; | |
/** | |
* A Java program to create a Randomly Generated UUID i.e. Version 4 UUID | |
* @author Gaurav Kukade at coderolls.com | |
* | |
*/ | |
public class CreateUUID { | |
public static void main(String[] args) { | |
// creating random uuid i.e. version 4 UUID | |
UUID uuid = UUID.randomUUID(); | |
System.out.println("Printing the randomly generated UUID value......\n"); | |
System.out.println("uuid: "+uuid); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: