since there's no accessible counter or i
in there to reset to zero.
is there any way to play around with continue
or break
to achieve that?
class CommandLine {
public int[] sort(int array[]) {
int temp;
for (int i=0; i<array.length-1; i++) {//must have used for-each
if (array[i] > array[i+1]){
temp = array[i];
array[i] = array[i+1];
array[i+1] = temp;
i=-1;
}//if end
}//for end
return array;
}//main end
}//class end