Here you can find the source of merge(double[]... args)
public static double[] merge(double[]... args)
//package com.java2s; //License from project: Apache License public class Main { public static double[] merge(double[]... args) { int size = 0; for (int i = 0; i < args.length; i++) { size += args[i].length;//from ww w .j a va 2s.c om } double[] merged = new double[size]; int start = 0; for (int i = 0; i < args.length; i++) { System.arraycopy(args[i], 0, merged, start, args.length); start += args[i].length; } return merged; } }