public class Text03 {
public static void main(String[] args) {
String[] arr = {"x","y","z"};
for (int a = 0; a < 3; a++) {
//当a匹配到x时,continue
if (arr[a].equals("x"))
continue;
//当c匹配到x或z或者c匹配的人与a相同时,continue
//而比较arr[c]与arr[a]是否相同,实际上就是比较c的值与a是否相同,将arr[c].equals(arr[a])简化为c == a
for (int c = 0; c < 3; c++) {
if (arr[c].equals("x") || arr[c].equals("z") || c == a)
continue;
//当b匹配的人与a或c相同时,continue
for (int b = 0; b < 3; b++) {
if (b == a || b == c)
continue;
System.out.println("a VS " + arr[a] + ",b VS " + arr[b] + ",c VS " + arr[c]);
}
}
}
}
}话说楼主介意发个50道题的资源不_(:з」∠)_