what is your opion of this code and is there another way to do this?
this only the method used to sort the two arrayes
public void sort(String[] names, int[] grade){
boolean swapped;
do{
swapped = false;
for (int i = 0; i < names.length-1; i++) {
if(names[i].compareToIgnoreCase(names[i+1])>0){
String temp = names[i+1];
names[i+1] = names[i];
names[i] = temp;
int temp1 = grade[i+1];
grade[i+1] = grade[i];
grade[i] = temp1;
swapped=true;
}
}
}while(swapped);
}