public static void main(String[] args) {
// TODO Auto-generated method stub
int[] a = {1,2,3};
int[] b = {4,5,6};
int[] c = test(a,b);
}
public static int[] test(int[] a,int[] b){
int a_length = a.length;
int b_length = b.length;
int c_length = a_length * b_length;
int[] c = new int[c_length];
int num = 0;
for(int i=0;i<a_length;i++){
for(int j=0;j<b_length;j++){
int temp = a[i] * b[j];
System.out.println(temp);
c[num++] = temp;
}
}
return c;
}
追问oh my god!原来是这样,听君一言,真是茅塞顿开,太感谢了!!