Here you can find the source of print(float[] array, NumberFormat nf)
Parameter | Description |
---|---|
array | a parameter |
nf | the NumberFormat |
public static void print(float[] array, NumberFormat nf)
//package com.java2s; /*/*from w w w. ja va 2s . c om*/ * Copyright (C) 2010-2014 Andreas Maier * CONRAD is developed as an Open Source project under the GNU General Public License (GPL). */ import java.text.NumberFormat; public class Main { /** * Prints the contents of the float array on standard out. * @param array * @param nf the NumberFormat */ public static void print(float[] array, NumberFormat nf) { System.out.print("["); for (int i = 0; i < array.length; i++) { System.out.print(" " + nf.format(array[i])); } System.out.println(" ]"); } /** * Prints the array on standard out and denotes the arrays name. * @param name the name * @param array the array * @param nf the number format */ public static void print(String name, float[] array, NumberFormat nf) { System.out.print(name + " = "); print(array, nf); } /** * Prints the array on standard out. Uses NumberFormat.getInstance() for number formatting * @param name the name * @param array the array */ public static void print(String name, float[] array) { print(name, array, NumberFormat.getInstance()); } /** * Prints the array on standard out. Uses NumberFormat.getInstance() for number formatting * @param array the array */ public static void print(float[] array) { print(array, NumberFormat.getInstance()); } }