Created
December 23, 2020 17:18
-
-
Save gauravkukade/395f314c549969bd300d72c7e032dbcb to your computer and use it in GitHub Desktop.
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: