嗨,我是 java 初学者,我的程序有 4 个 for 循环:我的程序是这样b
工作 的for循环也会如此,我该怎么做?有break语句?true
n
n--
l
l++
for (int l = 0; l < n; l++) {
for (int i = 1; i < (n - 2); i++) {
for (int j = i + 1; j < (n - 1); j++) {
for (int k = j + 1; k < n; k++) {
if (l != i && l != j && l != k) {
boolean b = isOK(pointList.get(l), pointList.get(i), pointList.get(j), pointList.get(k));
System.out.println(b);
if (b == true) {
pointList.remove(pointList.get(l);
n--;
break;
}
else
System.out.println(b);
}
}
}
}
}