i have a two dimensional array and i'm trying to sort each column at a time. this is what i have for it right now:
CODE
input = JOptionPane.showInputDialog(null, "Please enter your polynomial equation.");
input = input.replaceAll("\\s+", "").replaceAll("\\(", " ").replaceAll("\\)", " ");
StringTokenizer tokenizer = new StringTokenizer(input);
while(tokenizer.hasMoreTokens())
{
first[count] = (tokenizer.nextToken());
count++;
}
first[0] = first[0].replaceAll("x", "").replaceAll("X","").replaceAll("\\^", " ").replaceAll("\\+", " ").replaceAll("\\-", " -");
tokenizer = new StringTokenizer(first[0]);
len = first[0].length() / 2;
Double[][] in1 = new Double[len][2];
while(tokenizer.hasMoreTokens())
{
if(col == 1)
{
col = 0;
}
else
{
in1[row][col] = Double.parseDouble(tokenizer.nextToken());
}
row++;
}
//heres where im trying to sort it.
in1 = Arrays.selectionSort(in1);
it gives me the error:
CODE
--------------------Configuration: <Default>--------------------
G:\Java\token5.java:55: cannot find symbol
symbol : method selectionSort(java.lang.Double[][])
location: class java.util.Arrays
in1 = Arrays.selectionSort(in1);
^
1 error
am i doing something wrong in the coding or is this not workable with a two dimmensional array?