Unique Id's in java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/325443/generate-uuid-in-java">Generate UUID in Java</a><br>
  <a href="http://stackoverflow.com/questions/2982748/create-a-guid-in-java">Create a GUID in Java</a>  </p>
</blockquote>



<p>I am using below snippet for generating unique id's</p>

<pre><code>String id = Long.toString(System.nanoTime());
</code></pre>

<p>Problem is it generates same id till 1 min.</p>

<p>Is there any other way to generate unique id's?</p>
