Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Showing posts with label Java Random. Show all posts
Showing posts with label Java Random. Show all posts

Sunday, May 25, 2014

Generate Random Unique Identifier in Java

Here's a quick one on how to generate random numbers.
                UUID mId;  //be sure to import java.util.UUID;
  //generate random unique identifier
  mId = UUID.randomUUID();