Bubble sort on 2D Array Java
问题 String[][] 2dArray = new String[counter][2]; 2dArray [counter][column1] = String.valueOf(counter); 2dArray [counter][column2] = "something something something"; for(int i = 0; i < 2dArray.length-1; i++){ for(int j = i + 1; j > 0; j--){ if(2dArray[i][j] < 2dArray[i-1][j]){ int[][] temp = 2dArray[i-1][j]; 2dArray[i-1][j] = 2dArray[i][j]; 2dArray[i][j] = temp; } } } Attempting to sort the array so that column 1 is ascending. I've studied the other references on here and mimic'd them but for some