1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
int [] rij ={6,4,3,9,2,5,8,1}; int hulp; for(int i=rij.length;i>1;i--) { for(int j=0;j<i-1;j++) { if(rij[j]>rij[j+1]) { hulp=rij[j]; rij[j]=rij[j+1]; rij[j+1]=hulp; } } }