title: How to generate a random 9-digit number in Java?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/325443/generate-uuid-in-java">Generate UUID in Java</a>  </p>
  </blockquote>
  
  
  
  <p>I need to generate a 9-digit unique code like the ones used on the back of products to identify them.</p>
  
  <p>The codes should be non repeating and they should have no correlation between the numbers. And also the code should be all integers.</p>
  
  <p>I need to generate them using java and simultaneously insert them into the database.</p>