Here you can find the source of printMatrix(double[][] matrix)
public static void printMatrix(double[][] matrix)
//package com.java2s; //License from project: Open Source License public class Main { public static void printMatrix(double[][] matrix) { for (double[] ds : matrix) { printVector(ds);//from w ww . ja v a 2 s . c om } } public static void printVector(double[] vector) { for (double d : vector) { System.out.print(d + " "); } System.out.println(); } }