How to generate random universally unique identifier using UUID in Java

1 Answer

0 votes
import java.util.UUID;

public class MyClass {
    public static void main(String args[]) {
        UUID uuid = UUID.randomUUID();
        
        System.out.println(uuid);
    }
}



/*
run:

2ec577c5-1d6d-42a1-aeb4-bc15c8727788

*/

 



answered Mar 21, 2021 by avibootz

Related questions

1 answer 239 views
4 answers 495 views
1 answer 209 views
1 answer 143 views
143 views asked Mar 29, 2021 by avibootz
1 answer 154 views
154 views asked Mar 21, 2021 by avibootz
1 answer 117 views
...