Here you can find the source of clone2DArray(Double[][] array)
Parameter | Description |
---|---|
array | : 2D Double Array |
public static Double[][] clone2DArray(Double[][] array)
//package com.java2s; public class Main { /**/*from w w w. j ava 2 s. c o m*/ * Clones a 2D Double Array * * @param array : 2D Double Array * @return : exact copy of the Array */ public static Double[][] clone2DArray(Double[][] array) { Double[][] new_array = new Double[array.length][array[0].length]; for (int i = 0; i < array.length; i++) { for (int j = 0; j < array.length; j++) { new_array[i][j] = new Double(array[i][j]); } } return new_array; } }