方法里面的返回值(数组)

方法里面的返回值(数组)
public static void hel(int[] a,int[] b,int[] c){
      System.arraycopy(a, 0, c, 0, a.length);
      System.arraycopy(b, 0, c, a.length, b.length);
 }
 public void testabc(){
      int[] str = new int[4];
      int[] a = new int[]{1,2};
      int[] b = new int[]{3,4};
      hel(a,b, str);
      for(int i=0;i<str.length;i++){
           System.out.println(str[i]);
      }
 }

你可能感兴趣的:(方法里面的返回值(数组))