例:输入
数组A(a,b,c)
数组B(x,y,z)
输出 共有9种情况
多少种方法。
双重循环遍历。
能得到九种结果。
public class Demo {
public static void main(String[] args) {
char[]A = {'a','b','c'};
char[]B= {'x','y','z'};
for(int i=0;i<A.length;i++){
for(int j=0;j<B.length;j++){
System.out.println(A[i]+","+B[j]);
}
}
}
}