
-----------------------------------
a22asin
Sun Dec 01, 2013 4:17 pm

Selective Sorting
-----------------------------------
Hi, so im trying to use selective sorting to sort an array of strings alphabetically (case -insensitive), where each string is one word. I got this codes from my textbook and i modified it to work with strings. But the  array does not sort properly. It seems like it diesnt ignore the cases and it doesnt sort the words properly.

ie.When i print array[0] through array [3] it will do:
Ambro
Aaron
Aach
aba

instead of

aba
Aach
Aaron
Ambro

[code]
public static String[] selectionSort(String[] array){
		
		int current = 0;
		
		while(current < array.length){ //need n iterations for n elements
			//value and index to start with
			String minValue = array[current]; 
			int minIndex = current;
		
			for(int i = current; i