Who understands number sorts?

How can i convert this this sort numericaly?

This reading from a file as well!

publicvoid SortCarsAlphabetically()

{

int tempPrice;

String tempCar;

for (int a = 0; a < count-1; a++)

{

min = a;

for (int b =a+1; b<count; b++)

{

if (car[b].compareTo(car[min])><0)

{

min = b;

}

}

tempCar = car[a];

car[a] = car[min];

car[min] = tempCar;

tempPrice = price[a];

price[a] = price[min];

price[min] = tempPrice;

{

}

System.out.println("*--*");

System.out.println("*The cars have now been alphabetically sorted*");

System.out.println(car[a]+"" +price[a]);

System.out.println("*--*");

}

}

cheers

[1410 byte] By [junglecat1a] at [2007-11-26 18:02:03]
# 1
if (car[b].compareTo(car[min])<0)Change this so that you are comparing them numerically.
CaptainMorgan08a at 2007-7-9 5:31:48 > top of Java-index,Java Essentials,Java Programming...