对于下面提到的以下代码,我在“Return Cols”语句中得到了错误“Unreachable statement error”
代码计算生成的输出 CSV 文件中最大剂量的位置
public int getPosition() {
double dose = 0.0;
double position = 0.0;
int rows = 0;
int cols = 0;
String s;
for (int j = 1; j < nz; j++) {
s = "";
for (int i = 1; i < nx; i++) {
for (DetEl det_el : det_els) {
if (det_els.get(j + i * nz).getDose() == getMaxDose()) {
i=rows;
j=cols;
}
// comma separated or Semicolon separated mentioned here
}
// prints out the stream of values in Doses table separated by Semicolon
}
}
return rows;
return cols;//unreachable statement error obtained at this position.
}
任何帮助是极大的赞赏