Thanks
Vikas Sharma
SCJP(1.4)
Originally posted by Paul Sturrock:
Will a UID do?
Thanks
Vikas Sharma
SCJP(1.4)
Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Originally posted by Remko Strating:
You could create an uniqueId by using the nano time
It will only work with jdk 1.5.
Thanks
Vikas Sharma
SCJP(1.4)
Originally posted by Rahul Bhattacharjee:
UID is from SE 6.0.
Joanne
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Rahul Bhattacharjee:
But if you want to use this in lower versions then might consider using Random()
[to create randomness you might want to add new Object().hashcode() in the constructor of Random()]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Rahul Bhattacharjee:
My understanding is that when a unique number generator generates a number and delivers it to the caller , it doesn't remember / cache the number.So when it generates the next unique number then without comparing with the previously generated values how can the program say that its not been generated before.
Joanne
There is no such line. They are separate concepts.Originally posted by Rahul Bhattacharjee:
I think there is a thin line differentiating between randomness and uniqueness.Could you please help me understand this.
Originally posted by Paul Clapham:
There is no such line. They are separate concepts.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Consider Paul's rocket mass heater. |