I am having an assignment about creating password through Java:
Suppose you work in a safe selling company and your manager asked you to create a list of all the ten digit numbers between 0000000000 and 9999999999 without repeating a digit in the same number. What is the method to do this algorithm in JAVA?
Here's what I've done so far:
public static long generateNumber()
{
String s1 = "33333";
double d = Math.random();
d=d*100000.0;
int i = (int) d;
String s2 = String.valueOf(i);
String s3=s1+s2;
long m = Long.parseLong(s3);
return m;
}