List of utility methods to do Array Print
void | printArray(double[] a) print Array System.out.print("["); for (double e : a) { System.out.print(e + ", "); System.out.println("]"); |
void | printArray(double[] array, String info) print Array System.out.println(info); String outStr = ""; for (int i = 0; i < array.length; i++) outStr += array[i] + "\t"; System.out.println(outStr); |
void | printArray(double[] d) Prints out the array in the format "[1.0, 2.0, 3.0]" System.out.print("["); for (int i = 0; i < d.length; ++i) { if (0 != i) System.out.print(","); System.out.print(d[i]); System.out.println("]"); |
void | printArray(E[] a) print Array System.out.println(Arrays.deepToString(a).replace("],", "],\n")); |
void | printArray(float[] array) print Array List<Float> output = new ArrayList<Float>(); for (float item : array) { output.add(item); System.out.println(output); |
void | printArray(float[] spectrum) print Array if (spectrum == null) { System.out.println("null"); return; System.out.print("["); for (int i = 0; i < (spectrum.length - 1); i++) System.out.print(spectrum[i] + ", "); if (spectrum.length > 0) ... |
void | printArray(int A[]) print Array System.out.println(Arrays.toString(A)); |
void | printArray(int arr[]) Prints the contents of an int array to the comnand line. for (int i = 0; i < arr.length; i++) { System.out.print(arr[i] + " "); |
void | printArray(int[] array) print Array for (int x : array) { System.out.println(x); |
String | printArray(int[] array) Pretty prints an array of ints as a string. String result = "["; for (int i = 0; i < array.length; i++) { result += array[i]; result += (i < (array.length - 1)) ? ", " : ""; result += "]"; return result; |