public class Sort { public void bubbleSort(String a[], int left, int right) { String temp; for(int i=left; ii; j--) { if( a[j].compareTo(a[j-1])<0 ) { temp = a[j-1]; a[j-1] = a[j]; a[j] = temp; } } } } }