[pedantic mode]There is no such thing as a multi-dimensional array in
Java, only arrays of arrays; you will see the
Java™ Language Specification says the component of an array may itself be an array.[/pedantic mode]
You are trying to do it the hard way. You need to learn how to sort an int[] using the < or > operators. Hint: start by making a swapPairInArray() method like this.
Overload your method to take an Object[].
Look up sorting algorithms, for example in
Niklaus Wirth's book, available free on the net. Implement one of those algorithms for
int[] arrays, then for
Comparable[] arrays. As an example, try a
String[] because
String implements Comparable.
Then work out how to sort things when their members are already arrays. You will have to work out what criterion you are using to tell whether {1, 2, 3) is greater or less than {3, 2, 1}.