Assume I have this 2D array:
array[0][] = {5,B,2}
array[1][] = {9,R,4}
array[2][] = {3,B,1}
array[3][] = {1,R,8}
How can I sort this array in such a way that this is the output:
array[0][] = {3,B,1}
array[1][] = {5,B,2}
array[2][] = {9,R,4}
array[3][] = {1,R,8}
Basically sorting them based on the [i][2] element.
This is how I declared the array:
String[][] splitnodes = new String[7][];
Is it even possible? If it is, how?
Thanks!