how to generate a unique number from a series of numbers
sai srinivas jonnalagadda
Joined: Jul 27, 2011
I am developing a application, which has some int manipulations.
Thing is i am getting input values as 31958379002001000, 31958379002001000, 31898379002001000, 31828379002002000, 31828379002002000 etc.
they are not fit in int. but i must use int only.
so, I want to generate a distinct unique number for each of the big input number shown above and display them in response in some how. and the resultant number should again be fit in int size.
I need it very urgent. please help me.
Joined: Sep 29, 2007
You can use
long number = 31958379002001000L;
int i = (int)(number ^ number >>> 32);