int[] s = {3,8,2,4,5,9,7,1};
int temp1 = 0,temp2 = 0;
for(int i=0;i temp1){
temp2 = temp1;
temp1 = s[j];
s[j] = temp2;
}
}
s[i] = temp1;
}
System.out.println("print");
for(int ss :s){
System.out.println(ss);
}