流采集器到二维数组
//package com.nowjava;/*nowjava - 时 代 Java 提 供*/ import java.util.Collection; import java.util.stream.Collectors; import java.util.stream.Stream; public class Main { public static void main(String[] argv) throws Exception { Collection collection = java.util.Arrays.asList("asdf", "nowjava.com"); System.out/**来 自 NowJava.com - 时代Java**/ .println(java.util.Arrays.toString(to2DArray(collection))); } public static double[][] to2DArray(Collection<double[]> collection) { return collection.toArray(new double[collection.size()][]); } public