public class radom {
public static void main(String[] args) throws Exception{
final int L=10;
int[] a=new int[L];
for(int i=0;i<a.length;i++){
a[i]=(int)(Math.random()*(L));
for (int j = 0; j <i; j++) {
while(a[i]==a[j])
{
a[i]=(int)(Math.random()*(L));
}
}
System.out.println(a[i]);
}
}}