public class ArrayTest {
public static void main(String[] args) {
int[] arr = new int[6];
int i = 0;
label: while (i < 6) {
int num = (int) (Math.random() * 30 + 1);
arr[i] = num;
for (int j = 0; j < i; j++) {
if (arr[j] == arr[i]) {
continue label;
}
}
i++;
}
for (int j = 0; j < 6; j++) {
System.out.print(arr[j] + "\t");
}
}
}