I am trying with below code to generate 10 digits unique random number. As per my req i have to create around 5000 unique numbers(ids). This is not working as expected. It a
I would use
long theRandomNum = (long) (Math.random()*Math.pow(10,10));