Here you can find the source of printArrayP(double[][] p)
public static void printArrayP(double[][] p)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; public class Main { public static final DecimalFormat df = new DecimalFormat("####0.##########"); public static void printArrayP(double[][] p) { for (int i = 0; i < p.length; i++) { for (int j = 0; j < p[i].length; j++) { System.out.print(df.format(p[i][j])); // System.out.print(df.format(p[i][j])+" , "); if (!(j + 1 == p[i].length)) { System.out.print(" , "); }/*from w w w . j a v a 2s. co m*/ } System.out.println(""); } System.out.println(""); } public static void printArrayP(int[][] p) { for (int i = 0; i < p.length; i++) { for (int j = 0; j < p[i].length; j++) { System.out.print(df.format(p[i][j])); // System.out.print(df.format(p[i][j])+" , "); if (!(j + 1 == p[i].length)) { System.out.print(" , "); } } System.out.println(""); } System.out.println(""); } }