hi all,
 I am trying to understand how the UUID generation works, I am trying to
run the *code snippet 1  *,100 times, and it prints the same number 100
times, Is it not supposed to print a different number eachtime.And If I run
the *code snippet 2  * 100 times, I get a    different number each time .The
documentation says *code snippet 1*   is efficient than *code snippet
2.  ,*forgive my ignorance
*.* Please help
**
**
**
**
*code snippet 1 :*
**
for ( int i=0; i<100; i++){
  System.out.println("*******"+ UUID.nameUUIDFromString("namespace",new
UUID("f807f2fc-b49b-4512-a787-92300367b932"),UUID.SHA1_ENCODING));
 }


*code snippet 2 :*
**
for ( int i=0; i<100; i++){
  System.out.println("******* "+UUID.randomUUID().toString());
 }

Thanks
Pradeep

Reply via email to