package test;
import java.util.Random;
public class Test2 {
public static void swap(int a[],int i ,int j){
if(a != null && a.length != 0){
if(i<j){
if(j <= a.length){
int k = a[i];
a[i] = a[j];
a[j] = k;
}
}
}
}
public void generate(int a[]){
for(int i = 0; i < 100 ;i++){
a[i] = i;
}
}
public static void print(int a[]){
for(int i = 0 ;i < 100;i++){
System.out.print(a[i]+" ");
if((i+1)%10==0){
System.out.println();
}
}
}
public static void main(String[] args){
int a[] = new int[100];
new Test2().generate(a);
int hightBound = 99;
int tmpBound ;
while(hightBound >= 1){
tmpBound = new Random().nextInt(hightBound);
swap(a,tmpBound,hightBound);
hightBound--;
}
print(a);
}
}