Here is a brief program that accomplishes exactly what you've requested (although perhaps not what you actually want). It should be noted that storing the values in Strings is necessary because you specified in the comments that leading zeroes are possible and must count towards the length of the number.
This program will generate five (you can increase this) Strings which will be anywhere inclusively between 5 and 10 characters long. Any of those characters can be arbitrarily zero or one. The list of all Strings is guaranteed not to contain any duplicates.
import java.util.Random;
public class Test {
/* generate a random number, inclusively */
public static int randNum(int min, int max) {
Random rand = new Random();
int randomNum = rand.nextInt((max - min) + 1) + min;
return randomNum;
}
public static boolean contains(String haystack[], String needle) {
for(int i=0; i<haystack.length; i++)
if(haystack[i].equals(needle)) return true;
return false;
}
public static void main(String []args){
String numbers[] = {"","","","",""};
int i = 0;
while(i < 5) {
int length = randNum(5,10);
String number = "";
for(int j=0; j<length; j++) {
number += String.valueOf(randNum(0,1));
}
if(contains(numbers,number)) continue;
else {
numbers[i] = number;
i++;
}
}
for(int k=0; k<numbers.length; k++) {
System.out.println(numbers[k]);
}
}
}