Java Array Copy copyArray(int[][] links, int rowNum, int columnNum)

Here you can find the source of copyArray(int[][] links, int rowNum, int columnNum)

Description

copy Array

License

Open Source License

Declaration

public static int[][] copyArray(int[][] links, int rowNum, int columnNum) 

Method Source Code

//package com.java2s;
/**//from  w  w  w .  j  a  v a2  s.c  o m
 *  Copyright (c)  2016-2020 Weibo, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Weibo, 
 *  Inc. ("Confidential Information"). You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into with Weibo.
 */

public class Main {
    public static int[][] copyArray(int[][] links, int rowNum, int columnNum) {
        int[][] result = new int[rowNum][columnNum];
        for (int i = 0; i < rowNum; ++i) {
            for (int j = 0; j < columnNum; ++j) {
                result[i][j] = links[i][j];
            }
        }
        return result;
    }
}

Related

  1. copyArray(double[] src, double[] dest, int len)
  2. copyArray(double[][] d)
  3. copyArray(int[] ar)
  4. copyArray(int[] inArr, int[] outArr)
  5. copyArray(int[][] arr)
  6. copyArray(int[][] src)
  7. copyArray(int[][][] data)
  8. copyArray(long[] array)
  9. copyArray(Object source, Object dest, int count)