import java.util.Arrays;
public class Random{
public static void main(String[] args) {
int a[] = new int[10];
a[0] = (int) (Math.random() * 10 + 1);
outer: for (int i = 1; i < 10; i++) {
int t = (int) (Math.random() * 10 + 1);
for (int j = 0; j < 10; j++) {
if (t == a[j]) {
i--;
continue outer;
}
}
a[i]=t;
}
System.out.println(Arrays.toString(a));
}
}
public class Random{
public static void main(String[] args) {
int a[] = new int[10];
a[0] = (int) (Math.random() * 10 + 1);
outer: for (int i = 1; i < 10; i++) {
int t = (int) (Math.random() * 10 + 1);
for (int j = 0; j < 10; j++) {
if (t == a[j]) {
i--;
continue outer;
}
}
a[i]=t;
}
System.out.println(Arrays.toString(a));
}
}