I'm using the following method, however in the WHILE line it's error. Netbeans says
"bad operand types for binary operator" & & ", first type: boolean, second type: int".
public boolean insertionSort(String a []) {
if (a == null) return false;
int i,j; String x;
for ( i=0; i < a.length; i++ ) {
x = a[i]; j = i;
while (j>0 && x.compareTo(a[j-1])) {
a[j] = a[j-1];
j--;
}
a[j] = x;
visualizarEtapa(a,i);
}
return true;
}