Q:

java: if statement which skips the following if statement

I have a 2D-String-array through which I am going row by row to find the minimum. When I found the minimum I am adding the row of the found minimum to an ArrayList to skip the row in the next iteration to find the second lowest number of the Array. I am doing this until every row number is part of the ArrayList.
See my code so far:
List assignedRow = new ArrayList();    
for(int t = 0; t < excelMatrix.length-1; t++){    
double lowest = Double.parseDouble(excelMatrix[0][1]);
    int row = 0, column = 0;    

    for(int r = 0; r < excelMatrix.length-1; r++){                      
        if(assignedRow.contains(r) == true) continue;               
        for(int c = 1; c < excelMatrix[r].length; c++){             
            double value = Double.parseDouble(excelMatrix[r][c]);
            if(lowest > value) {
                lowest = value;
                row = r;    
                column = c; 
            }   
        }   
    } 
    assignedRow.add(row);
}

The code works fine so far, until the minimum is in row 0. Afterwards it is always executing the continue condition.
I am now looking for something which allows me to go back into the for loop, using the next higher r which is not part of the ArrayList.
I hope I made my problem clear.

A:

I hope this will work.
  List assignedRow = new ArrayList();
    double lowest = 0;
    while (assignedRow.size() < excelMatrix.length) {

        // find intial lowest value from non assign row to compare
        for (int t = 0; t < excelMatrix.length - 1; t++) {
            if (!assignedRow.contains(t)) {
                lowest = Double.parseDouble(excelMatrix[t][0]);
                break;
            }
        }

        int row = 0, column = 0;
        for (int r = 0; r < excelMatrix.length - 1; r++) {
            if (assignedRow.contains(r)) continue;
            for (int c = 0; c < excelMatrix[r].length; c++) {
                double value = Double.parseDouble(excelMatrix[r][c]);
                if (lowest > value) {
                    lowest = value;
                    row = r;
                    column = c;
                }
            }
        }
        assignedRow.add(row);
    }

Your code will not work if lowest value is stored at first column of any row because you are start iterating from column index 1 (third for loop int c=1 and lowest = Double.parseDouble(excelMatrix[0][1])

