code: public static int[][] copyOf(final int[][] nums) {
          final int[][] copy = new int[nums.length][];
  
          for (int i = 0; i < copy.length; i++) {
              final int[] member = new int[nums[i].length];
              System.arraycopy(nums[i], 0, member, 0, nums[i].length);
              copy[i] = member;
          }
  
          return copy;
      }
docs: Make a copy for a 2D array
  
  @param nums
  @return