Here you can find the source of deepCopy2DArray(float[][] a)
public static float[][] deepCopy2DArray(float[][] a)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static float[][] deepCopy2DArray(float[][] a) { if (a == null) { return null; }// w ww . j av a2 s . c o m float[][] result = new float[a.length][]; for (int i = 0; i < a.length; i++) { // copyOf suffices only because these are primitives: result[i] = Arrays.copyOf(a[i], a[i].length); } return result; } }